Oracle UTL_URL
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose Escape/Unescape URLs
AUTHID DEFINER
Dependencies
DBMS_ISCHED SDO_RDF UTL_HTTP
DBMS_ISCHED_REMOTE_ACCESS SPARQL_SERVICE_IMPL_T UTL_URL_LIB
SDO_GCDR URIFACTORY  
Documented Yes
Exceptions
Error Code Reason
ORA-29262 BAD_URL: The URL contains badly formed escape code sequences
ORA-29274 BAD_FIXED_WIDTH_CHARSET: Fixed-width multibyte character set not allowed as a URL character set
First Available 9.0.1
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/utlurl.sql
Subprograms
 
ESCAPE
Returns a URL with illegal characters (and optionally reserved characters) escaped using the %2-digit-hex-code format utl_url.escape(
url                   IN VARCHAR2 CHARACTER SET ANY_CS,
escape_reserved_chars IN BOOLEAN DEFAULT FALSE,
url_charset           IN VARCHAR2 DEFAULT utl_http.get_body_charset)
RETURN VARCHAR2 CHARACTER SET url%CHARSET;
SELECT utl_url.escape('https://www.mlib.com/a url with space.html');

UTL_URL.ESCAPE('HTTPS://WWW.MLIB.COM/AURLWITHSPACE.HTML')
----------------------------------------------------------
https://www.acme.com/a%20url%20with%20space.html
 
UNESCAPE
This function unescapes the escape character sequences to its original form in a URL, to convert the %XX escape character sequences to the original characters. utl_url.escape(
url         IN VARCHAR2 CHARACTER SET ANY_CS,
url_charset IN VARCHAR2 utl_http.get_body_charset)
RETURN VARCHAR2 CHARACTER SET url%CHARSET;
SELECT utl_url.unescape('https://www.mlib.com/a%20url%20with%20space.html');

UTL_URL.UNESCAPE('HTTPS://WWW.MLIB.COM/A%20URL%20WITH%20SPACE.HTML')
---------------------------------------------------------------------
https://www.mlib.com/a url with space.html

Related Topics
Built-in Functions
Built-in Packages
URIFACTORY
UTL_HTTP
UTL_INADDR
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved