URLencoder

Encodes and decodes URL strings: converts special characters to percent-encoded %XX format and back. Supports encodeURIComponent and encodeURI.

01Encoder02Comparison03About encoding04Questions05Related
01

Encoder

Mode
Function
Layout
Input string
Result · encodeURIComponent
Result will appear here…
Input: 0 chars · Output: 0 chars
02

What each function encodes

encodeURIComponent is more aggressive — encodes everything except safe. encodeURI preserves URL structure.
Character
encodeURIComponent
encodeURI
A–Z a–z 0–9
Not encoded
Not encoded
- _ . ! ~ * ' ( )
Not encoded
Not encoded
: / ? # @ &
%3A %2F %3F %23 %40 %26
Not encoded
= + , ;
%3D %2B %2C %3B
Not encoded
Space
%20
%20
Cyrillic А–Я а–я
%D0%9F… (UTF-8)
%D0%9F… (UTF-8)
Chinese, Arabic, emoji
%XX%XX… (UTF-8)
%XX%XX… (UTF-8)
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

Paste the text and pick the encoding you need — the tool replaces every character a URL cannot carry with a percent sequence. A space becomes `%20`, a slash `%2F`, and non-Latin letters expand to two or three pairs each, because percent encoding works on UTF-8 bytes rather than on characters.

Updated

«» added to favorites