URL Encode / Decode
Encode or decode text as a percent-encoded URL component, or as a full URI.
Output appears here
What is URL Encoding?
URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs into a %XX representation, where XX is the hexadecimal ASCII code of the character. For example, a space becomes %20 and an ampersand becomes %26.
This tool encodes strings for safe use in URLs and decodes percent-encoded strings back to their original form. It runs entirely in your browser.
How to URL encode or decode online
- Choose Encode or Decode mode.
- Paste your string into the Input box.
- The result appears instantly in the Output panel.
- Click Copy to copy the encoded or decoded string.
Frequently Asked Questions
What characters get encoded?
All characters except unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) are percent-encoded. Reserved characters like /, ?, #, and & are encoded when they appear in a query parameter value.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves structural characters untouched. encodeURIComponent encodes everything except unreserved characters, making it safe for individual query parameter values. This tool uses encodeURIComponent behavior.
Why does a space become %20 or +?
In query strings, spaces can be encoded as %20 (standard percent-encoding) or + (application/x-www-form-urlencoded format used in HTML form submissions). This tool outputs %20 by default.
What is URL encoding used for?
URL encoding is used to safely include arbitrary data — search queries, form values, and file names — in URLs. Without encoding, special characters like & and = would be interpreted as URL syntax rather than data.