URL_DECODE()
All functions > STRING > URL_DECODE()
Decodes a percent-encoded string (RFC 3986).
Signatures
Returns: Decoded string
URL_DECODE(encoded: VARCHAR) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
encoded | VARCHAR | Yes | Percent-encoded text |
Notes
%HHsequences become the corresponding bytes interpreted as text- Malformed percent-sequences or encoding issues fail at run time
- Returns NULL if the input is NULL (use
NULL(VARCHAR); bareNULLfails inference) - Inverse of
URL_ENCODEfor typical round trips
See also
Examples
FeatureQL
SELECT
f1 := URL_DECODE('a%20b'), -- Decode spaces
f2 := URL_DECODE(''), -- Empty string
f3 := URL_DECODE(NULL(VARCHAR)) -- NULL yields NULL
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR |
|---|---|---|
| a b | (empty) | NULL |
On this page