🔗 URL Encoder / Decoder
Percent-encode text for URLs or decode encoded URLs back to plain text. Runs entirely in your browser.
Component encoding (encodeURIComponent) escapes everything except unreserved characters — including & = / ? : @ + # . Use it for a single query-parameter value or path segment.
About the URL Encoder / Decoder
URLs may only contain a limited set of characters. Anything else — spaces, accented letters, symbols like &, ?, /, or # when they aren't acting as delimiters — must be percent-encoded: replaced with a % followed by the character's hexadecimal byte value (a space becomes %20). This tool encodes text into that form and decodes it back, entirely in your browser.
It offers the two encoding modes JavaScript itself distinguishes: encodeURIComponent for single values, and encodeURI for whole URLs. The auto-detect hint notices when your input already looks encoded and offers to switch direction.
How to use it
- Choose Encode or Decode, then paste your text or URL.
- Pick a mode — Component for a single query value or path segment, Full URL for an entire address.
- Watch the auto-detect hint: if your input already looks encoded (or already looks plain), it offers to switch direction with one click — but you stay in control.
- Review the highlighted changes to see exactly which characters were percent-encoded, then copy the output.
Component vs. Full URL
Component encoding (encodeURIComponent) escapes reserved characters like & = / ? : @ #, because inside a single parameter value those characters would otherwise break the URL structure. Full-URL encoding (encodeURI) deliberately leaves those delimiters intact so a complete URL keeps working, and only escapes truly unsafe characters such as spaces. Rule of thumb: encoding one value → Component; encoding a whole address → Full URL.
Features
🔁 Two-way
Encode plain text to percent-encoding, or decode an encoded URL back to readable text.
💡 Auto-detect
Notices when input already looks encoded (or plain) and suggests the right direction — you can override.
🎛 Component vs full URL
Switch between encodeURIComponent and encodeURI, with a plain-language explanation of each.
🔎 Change highlight
Every percent-encoded sequence is highlighted so you can see exactly what changed.
🚦 Safe on bad input
Malformed percent-encoding shows a clear inline message instead of a raw error.
🔒 100% client-side
All encoding and decoding happen in your browser. Nothing is sent to a server.
Frequently Asked Questions
What's the difference between encodeURI and encodeURIComponent?
encodeURIComponent escapes almost every reserved character, so it's meant for a single piece of a URL — one query-parameter value or path segment. encodeURI leaves URL delimiters like : / ? & = # intact so an entire URL still functions, escaping only unsafe characters like spaces. Use Component for values, Full URL for whole addresses.
Why does a space sometimes become %20 and sometimes +?
Percent-encoding turns a space into %20. The plus sign (+) for a space is a separate convention specific to the application/x-www-form-urlencoded format used by HTML form submissions and query strings. This tool uses standard %20 percent-encoding; if you need form-style encoding, replace %20 with + in query strings.
My decode failed with an error — why?
Decoding fails when the input contains malformed percent-encoding, such as a lone % not followed by two hex digits, or an invalid sequence like %ZZ. The tool catches this and shows an inline message instead of crashing. Check for stray % characters in your input.
Does this handle non-English characters and emoji?
Yes. Characters are encoded as their UTF-8 bytes, so accented letters, non-Latin scripts, and emoji all round-trip correctly — encode then decode returns exactly what you started with.
Is my input private?
Completely. All processing uses the browser's built-in encoding functions locally. Nothing you enter is transmitted to or stored on any server.