URL Encoder / Decoder
Encode or decode URLs and URL components instantly.
Common URL Encodings
Frequently Asked Questions
What is URL encoding?▼
URL encoding (percent encoding) replaces unsafe ASCII characters with a % followed by two hexadecimal digits. For example, a space becomes %20. This ensures URLs can be transmitted safely over the internet.
What is the difference between encodeURI and encodeURIComponent?▼
encodeURI encodes a full URL, leaving reserved characters like /, ?, &, = untouched. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ), making it safe for encoding query string values.
Why does + appear in URLs?▼
In HTML form submissions, spaces in query strings are sometimes encoded as + instead of %20. This is technically HTML form encoding (application/x-www-form-urlencoded), not strict URL encoding. Servers typically accept both.
What characters are safe in URLs?▼
Unreserved characters that don't need encoding: A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), and tilde (~). All other characters should be percent-encoded when used in a URL query string.