About the URL Encoder / Decoder
How it works and what makes it accurate for real-world use.
What it is
The URL Encoder / Decoder is a free, browser-based tool that converts text to percent-encoded URL strings and back in real time — bidirectionally. Paste text in either field and the other updates instantly. It supports two encode modes, handles full Unicode via UTF-8 (so emoji, accents, and non-Latin characters round-trip correctly), validates decode input with clear error messages, and runs entirely in your browser with no data sent to any server.
Percent-encoding is not encryption — it is a data transport encoding. Anyone with the encoded string can decode it trivially. Use it to make values safe for inclusion in URLs, not to protect sensitive information.
What percent-encoding is
URLs can only contain a safe subset of ASCII characters. Any other character — spaces, accents, emoji, and characters with special URL meaning like &, =, ?, and # — must be encoded as a % followed by the character's two-digit hexadecimal code. For example, a space becomes %20, & becomes %26, and the emoji 🚀 becomes %F0%9F%9A%80. Decoding reverses the process — %20 becomes a space again.
Component vs full-URL mode
The two modes correspond to the two JavaScript encoding functions and serve different purposes:
Component mode
Uses encodeURIComponent / decodeURIComponent. Encodes everything including &, =, ?, /, :, and # — making it safe to use a value as a query-string parameter or path segment without corrupting the URL structure.
Full URL mode
Uses encodeURI / decodeURI. Preserves URL-structure characters (:, /, ?, =, &, #, @) so you can encode a complete URL and keep its scheme, host, path, and query string intact.
Features
Two-way live conversion
Type in either field — Plain text or Percent-encoded — and the other updates instantly. No separate encode/decode buttons to manage.
Component & full-URL modes
Switch between encodeURIComponent (for parameter values and path segments) and encodeURI (for whole URLs) with a single click. Re-encodes the active field immediately.
Full Unicode / UTF-8
Emoji, accented characters, and non-Latin scripts encode correctly to their UTF-8 percent-encoded form and decode back without errors.
Decode validation
Malformed percent-encoding (a lone %, %ZZ, truncated sequences) shows a specific, readable error instead of silently producing garbled output or throwing an uncaught exception.
Copy buttons
Copy either field's content to the clipboard with one click. Falls back to execCommand for older browsers.
Fully client-side
No server round-trips, no analytics on your input. Tokens, API keys, and query parameters stay in your browser.
Nothing stored
Input is not logged, saved, or retained. Refresh the page and it's gone.
Mobile-friendly
Fields and mode toggle stack on small screens with no horizontal overflow. All features work on mobile browsers.
When to use each mode
Use component mode when you have a single value to embed in a URL — a search query, an access token, a redirect path, or a filename. Encoding a b&c=d in component mode gives a%20b%26c%3Dd, which is safe to place after a = in a query string without confusing the parser. Use full-URL mode when you have a complete URL that contains characters like spaces or accents in the host or path but you don't want to lose the :// and / separators. Encoding https://example.com/a b?q=1 in full-URL mode preserves the slashes, colon, ?, and = while encoding the space as %20.