Skip to main content
VeloDB Cloud 26.x·Apache Doris 4.x (≤ 4.0 supported)·"Since X.Y" tags refer to Doris versionsversion mapping →

URL_DECODE

Description

Converts an url to a decode string.

Syntax

URL_DECODE( <str> )

Required Parameters

ParametersDescription
<str>the string to decode. If url is not a string type.

Return Value

The decoded value

Example

Decoding a percent-encoded URL — %3A:, %2F/.

select url_decode('https%3A%2F%2Fdoris.apache.org%2Fzh-CN%2Fdocs%2Fsql-manual%2Fsql-functions%2Fstring-functions');
+-------------------------------------------------------------------------------------------------------------+
| url_decode('https%3A%2F%2Fdoris.apache.org%2Fzh-CN%2Fdocs%2Fsql-manual%2Fsql-functions%2Fstring-functions') |
+-------------------------------------------------------------------------------------------------------------+
| https://doris.apache.org/zh-CN/docs/sql-manual/sql-functions/string-functions |
+-------------------------------------------------------------------------------------------------------------+

Decoding a application/x-www-form-urlencoded-style string — + → space, %26&.

select url_decode('Doris+Q%26A');
+---------------------------+
| url_decode('Doris+Q%26A') |
+---------------------------+
| Doris Q&A |
+---------------------------+