URL Encoder / Decoder

Encode & decode URLs Β· encodeURIComponent Β· encodeURI Β· query string builder Β· URL breakdown

Original
Encoded

Common URL Encoding Reference

CharEncodedName / note
Space%20or + in query strings
!%21Exclamation mark
#%23Hash / fragment delimiter
$%24Dollar sign
&%26Ampersand – query param separator
+%2BPlus (also decodes as space)
,%2CComma
/%2FSlash – path delimiter
:%3AColon – protocol delimiter
;%3BSemicolon
=%3DEquals – key=value delimiter
?%3FQuestion mark – query start
@%40At sign
[%5BOpen bracket
]%5DClose bracket

What is URL Encoder / Decoder?

URL Encoder / Decoder converts text to percent-encoded URL format and back. It encodes special characters (spaces, &, =, #, %, and others) as their percent-encoded equivalents (%20, %26, %3D, %23, %25) so they can appear safely in URLs, and decodes percent-encoded strings back to readable text.

URLs can only contain a specific set of safe characters. All other characters must be percent-encoded as %XX where XX is the hexadecimal UTF-8 byte value. This applies to query string values (where = and & are structural delimiters), path segments (where / is a delimiter), and fragment identifiers. The tool supports both full URL encoding (encodeURI behavior β€” leaves structural characters intact) and component encoding (encodeURIComponent behavior β€” encodes everything including structural characters).

Common use cases include encoding user-provided text before inserting it into a query string, decoding URL parameters received from a form or API call, building redirect URLs with embedded destination URLs (which must themselves be encoded), and debugging API requests where encoded values are hard to read.

How to Use

  1. Paste a string or URL into the input field.
  2. Select 'Encode' to percent-encode special characters, or 'Decode' to convert %XX sequences back to readable characters.
  3. Choose 'Component' mode to encode all special characters including & = ? # (for query string values). Choose 'URI' mode to preserve URL structure characters.
  4. Use 'Encode all' to escape every character including alphanumerics β€” useful for form submissions.
  5. Copy the result with the Copy button.

Examples

Encode 'hello world & more'

Result: hello%20world%20%26%20more β€” safe to use as a query parameter value

Encode a redirect URL

Result: https%3A%2F%2Fexample.com%2Fpage%3Fid%3D1 β€” the destination URL is encoded so the outer URL parser treats it as a single parameter

Decode '%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF'

Result: こんにけは β€” UTF-8 encoded Japanese characters decoded back to readable text

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL β€” it leaves structural characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) intact. encodeURIComponent encodes a single component β€” it encodes all characters except unreserved ones (A-Z a-z 0-9 - _ . ~). Use encodeURIComponent for query string values.

Why does a space sometimes appear as + and sometimes as %20?

Both represent a space. %20 is standard percent-encoding (RFC 3986). + as space is an older application/x-www-form-urlencoded convention used in HTML form submissions. Modern APIs use %20; legacy form-encoded data uses +. This tool uses %20 by default.

Can I encode the entire URL at once?

You can, but it will encode structural characters like / and ? making the URL unusable as a URL. Encode only the variable components (query values, path parameters) separately, then assemble the URL.

What characters are safe without encoding?

Unreserved characters (RFC 3986): A-Z, a-z, 0-9, hyphen, period, underscore, tilde. Everything else must be encoded if it is not serving a structural purpose in the URL.

Why are some characters double-encoded?

Double encoding (%2520 = encoded %) happens when a string is encoded twice. The first encoding turns % into %25; the second encoding encodes %25 into %2525. This is usually a bug β€” encode each component exactly once.

Related Tools