URL Encoder / Decoder
Encode and decode URLs and query strings. Convert special characters to percent-encoded format.
About URL Encoder/Decoder
Safely encode URLs for use in links, API calls, or forms. Decode percent-encoded URLs to human-readable text.
About this calculator
Encode text for use in a URL or decode a percent-encoded string. Paste, press Encode or Decode, and copy.
A missing encoding is one of the most common reasons links with spaces or symbols break.
How to use it
- Paste your text or URL.
- Press → Encode or ← Decode.
- Press Copy.
Percent-encoding
URLs can contain only certain characters. Others are replaced with % and two hex digits of the UTF-8 byte: a space is %20, & is %26, / is %2F and é is %C3%A9. encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), which is right for a query value. encodeURI leaves URL structure characters (: / ? # & =) alone, which is right for a whole address.
Worked example
Example
| hello world & more | hello%20world%20%26%20more |
| https://a.com/?q=café | https://a.com/?q=caf%C3%A9 (full URL mode) |
Runs entirely in your browser. Nothing you paste is uploaded.
Tips and common mistakes
- Encode query values, not the whole URL, with encodeURIComponent.
- A plus sign means space only in form data (query strings); use %20 elsewhere.
- Don't encode twice. %2520 means a literal %20.
- Non-English characters are encoded as UTF-8 bytes.
- If a link is broken by a special character, encode that part.
Frequently asked questions
What is URL encoding?
Replacing unsafe characters with % and two hex digits.
What is %20?
A space.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structure characters; encodeURIComponent encodes them.
Why do I see %2520?
The URL was encoded twice.
Does + mean space?
Only in query strings from HTML forms.
How do I decode a URL?
Press Decode.