url_encode
Make text safe for a URL by replacing spaces and special characters with percent codes.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
url_encode('this string has/ special+ characters>')Result
'this%20string%20has%2F%20special%2B%20characters%3E'To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
url_encode(string)- string
- Text
Supported signatures (1)
url_encode(string: VARCHAR) → VARCHARThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.