URLDECODE
Description
URLDECODE
is a row function that decodes a TEXT
value that has been encoded with the application/x-www-form-urlencoded
media type. URL encoding, also known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). When sent in an HTTP GET
request, application/x-www-form-urlencoded
data is included in the query component of the request URI. When sent in an HTTP POST
request, the data is placed in the body of the message, and the name of the media type is included in the message Content-Type
header.Syntax
URLDECODE
(URL_string
)Return Value
Returns a value of type
TEXT
with characters decoded as follows:- Alphanumeric characters (a-z, A-Z, 0-9) remain unchanged.
- The special characters hyphen (-), comma (,), underscore (_), period (.), and asterisk (*) remain unchanged.
- The plus sign (+) character is converted to a space character.
- The percent character (%) is interpreted as the start of a special escaped sequence, where in the sequence%,HHrepresents the hexadecimal value of the byte. Some common escape sequences:HHPercent Encoding SequenceValue%20space%0Aor%0Dor%0D%0Anewline%22double quote (")%25percent (%)%2Dhyphen (-)%2Eperiod (.)%3Cless than (<)%3Dgreater than (>)%5Cbackslash (\)%7Cpipe (|)
Input Parameters
- URL_string
- Required. A field or expression that returns aTEXTvalue. It is assumed that all characters in the input string are one of the following: lower-case letters (a-z), upper-case letters (A-Z), numeric digits (0-9), or the hyphen (-), comma (,), underscore (_), period (.) or asterisk (*) character. The percent character (%) is allowed, but is interpreted as the start of a special escaped sequence. The plus character (+) is allowed, but is interpreted as a space character.
Examples
Decode the values of the
url_query
field:URLDECODE([url_query])
Convert a literal URL encoded string (
N%2FA%20or%20%22not%20applicable%22
) to a human-readable value:URLDECODE("N%2FA%20or%20%22not%20applicable%22")
returns N/A or "not applicable".