URL Encoder & Decoder

// encode special characters in urls · decode percent-encoded strings · parse url components · nothing leaves your browser

encodeURIComponent — encodes all special characters except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use for encoding individual query parameter values.
waiting for input
raw input
encoded output
common encodings — click to copy

What is URL encoding?

URL encoding (also called percent-encoding) converts characters that aren't allowed in URLs into a safe format. Each character is replaced with a % followed by its two-digit hexadecimal ASCII code — for example, a space becomes %20.

This is essential when passing special characters like &, =, ?, or non-ASCII text (like Arabic or Chinese characters) in query strings or path segments.

How to use this tool

  • Use Encode to convert raw text into a URL-safe string
  • Use Decode to convert a percent-encoded URL back to readable text
  • Use Parse URL to break a full URL into its components
  • Choose encodeURIComponent for query values, encodeURI for full URLs
  • Click any character in the reference table to copy its encoded form

Frequently Asked Questions

What's the difference between encodeURI and encodeURIComponent?+
encodeURI is for encoding a complete URL — it leaves characters like /, ?, #, and & alone because they have structural meaning in a URL. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — use it for individual query parameter values.
Why is a space encoded as %20 and sometimes as +?+
In standard URL percent-encoding, a space is %20. In HTML form data (application/x-www-form-urlencoded), spaces are encoded as +. Both are valid in their respective contexts — this tool supports both via the encoding type selector.
Why do I see %C3%A9 for a single character?+
Non-ASCII characters (like accented letters or Arabic/Chinese text) are first encoded as UTF-8, which may produce multiple bytes per character. Each byte becomes a separate %XX sequence. For example, é is encoded as %C3%A9 because it's two bytes in UTF-8.
What characters are safe in a URL without encoding?+
Unreserved characters that never need encoding: uppercase and lowercase letters (A–Z, a–z), digits (0–9), and the symbols - _ . ~. Everything else should be percent-encoded depending on context.
How do I encode a full URL with query parameters?+
Encode each query parameter value individually using encodeURIComponent, then join them with & and append to the base URL. Don't encode the full URL at once — that would encode the ? and = separators, breaking the URL structure.