URL encoder & decoder
URL encode and URL decode online: converts special characters to the percent-encoded %XX format and back, and decodes a whole link. Supports encodeURIComponent and encodeURI.
01
Encoder & decoder
02
What each function encodes
encodeURIComponent is more aggressive — encodes everything except safe. encodeURI preserves URL structure.03
About URL encoding
URL encoding (percent-encoding) represents any character in a URL using ASCII sequences like %XX, where XX is a UTF-8 byte in hex. Necessary because a URL can only contain a limited set of safe characters.
Choose the function by task: encodeURIComponent — for a single query parameter value. encodeURI — for a full URL when you need to preserve its syntax (colons, slashes, question marks).
encodeURIComponent
most common'hello world!' → hello%20world!
Encodes everything except letters, digits and `- _ . ! ~ * ' ( )`. Characters `: / ? # @ & =` are also encoded — so a parameter value won't break the URL structure. Use for query values ?q=… and form data.
encodeURI
for full URLs'https://site.tld/path' → 'https://site.tld/path'
Preserves URL structure: does not encode `: / ? # [ ] @ ! $ & ' ( ) * + , ; =`. Use when you need to pass a full URL as a string without breaking its syntax.
Decoding
%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82 → 'привет'
The inverse operation — turns %XX sequences back into readable text. Also supports the `+` for space format from HTML forms (application/x-www-form-urlencoded).
Percent-encoding
RFC 3986%XX — where XX is the hex byte in UTF-8
Each unsafe character is written as `%XX`, where XX is the hex byte in UTF-8. Cyrillic takes 2 bytes (6 %XX%XX chars per letter), emoji up to 4 bytes.
04
Frequently asked questions
Updated