Function: text.url_encode_plus

Returns a string with percent-encoded reserved characters, and spaces replaced by pluses (+).

The reserved characters in the original string are replaced with theirpercent-escaped representation (%xx). Letters, digits, and the characters.-_ are not escaped.

Arguments

Arguments
source

string

The string that will be converted.

Returns

A percent-encoded copy of thesource string with spaces converted topluses.

Raised exceptions

Exceptions
TypeErrorIfsource is not a string.

Examples

# Return string with percent-encoded reserved characters and pluses# Returns "a%2Fb%2Fc%3Fitem%3Dd%2Be+f"-returnStep:return:${text.url_encode_plus("a/b/c?item=d+e f")}

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.