URL Encoder / Decoder

Encode or decode URLs and special characters instantly.

How to Encode and Decode URLs

  1. Encode a full URL — paste a complete URL and click "Encode URL" to make it safe for transport while preserving URL structure characters (/, ?, =, &).
  2. Encode a URL component — use "Encode Component" for a single value like a query parameter that may contain /, ?, = or & that need escaping.
  3. Decode a URL — paste a percent-encoded string (e.g. hello%20world) and click "Decode URL" to get back the original text.
  4. Copy the result — click Copy to copy the output.

Frequently Asked Questions

What is URL encoding (percent-encoding)?
URL encoding replaces unsafe or reserved characters with a % followed by two hexadecimal digits. For example, a space becomes %20, & becomes %26, and # becomes %23. This ensures URLs are safely transmitted over the internet without misinterpretation.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, leaving structural characters (/, ?, =, &, :, #) untouched because they have meaning within a URL. encodeURIComponent encodes a single component value (like a query string parameter) and encodes ALL special characters including /, ?, =, and &.
When should I encode a URL?
Encode URLs when: passing a URL as a query parameter value, embedding special characters in URL paths, building API requests, or ensuring compatibility with HTTP clients that reject unencoded characters.
What does %20 mean in a URL?
%20 is the URL-encoded representation of a space character. URLs cannot contain literal spaces, so they are replaced with %20. In HTML form submissions, spaces may instead appear as + in the query string.
What characters are safe in URLs?
The following characters are always safe and do not need encoding: alphanumeric characters (A–Z, a–z, 0–9), and the special characters - _ . ~ (unreserved characters per RFC 3986). All other characters should be percent-encoded for maximum compatibility.