URL Encoder Decoder Online
Percent-encode URL components or decode encoded strings. Supports encodeURIComponent and encodeURI modes for query parameters, full URLs, and handles Unicode characters correctly.
Built and maintained by Muhammad Tayyab — CEO & Founder, Mergemain.
Why Use URL Encoder Decoder Online?
Copy a search URL that contains a space or an ampersand and the server on the other end may receive a truncated query — the browser quietly silently cut the parameter at the first unescaped delimiter. URL encoding is the fix, but hand-encoding with a percent table is tedious and error-prone. A good encoder does two things: lets you pick the right RFC (`encodeURIComponent` for single parameter values vs. `encodeURI` for whole URLs), and preserves the characters that are already valid so you don't double-encode. The decoder is just as useful for reading logs and network tabs where everything is percent-escaped.
How to Use URL Encoder Decoder Online
- Enter the URL or text you want to encode in the input field.
- Click 'Encode' to convert special characters to percent-encoded format (%20, %3A, etc.), or paste an encoded URL and click 'Decode' to make it readable.
- Copy the result with the copy button.
- Pick encodeURIComponent for individual query-parameter values, or encodeURI for whole URLs that already contain /, ?, and #.
- Toggle 'decode + as space' if your input came from an HTML form body (application/x-www-form-urlencoded).
Worked Examples
Encode a search query for a redirect URL
Encode: "tom & jerry 2026 trailer"
tom%20%26%20jerry%202026%20trailer
Notice `&` → `%26` — without encoding, the `&` would start a new query parameter.
Decode a log URL to read it
Decode: https://api.example.com/search?q=hello%20world%20%E2%98%95
https://api.example.com/search?q=hello world ☕
The three-byte `%E2%98%95` sequence decodes to a single UTF-8 ☕ coffee emoji.
Double-encode a value that travels through two layers
Encode "value with /slash" twice
value%2520with%2520%252Fslash
Each `%25` is an encoded `%` — required when a value passes through a proxy that decodes once before forwarding.
About URL Encoder Decoder Online
URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a % followed by their hexadecimal byte value. A space becomes %20, an ampersand becomes %26, and an emoji becomes a multi-byte UTF-8 sequence like %E2%98%95. This tool encodes text into percent-encoded form and decodes encoded strings back into readable form, entirely in your browser. It offers both standard modes: encodeURIComponent for encoding individual query-parameter values, and encodeURI for encoding whole URLs while preserving the reserved characters (:, /, ?, #) that give a URL its structure. Unicode characters and emoji are handled correctly through UTF-8. Web developers building query strings are the core audience: every filter value, redirect URL and search term that goes into a link needs encoding before it is safe. API developers encode parameters before firing requests and decode the percent-escaped values they find in server logs and network tabs. Marketers and SEO folks debug UTM parameters, redirect chains and affiliate links that arrive fully escaped. QA engineers copy failing URLs from bug reports and decode them to read what the user actually typed. If a URL contains anything beyond plain ASCII, this tool earns a bookmark. A browser-based encoder wins on two fronts: correctness and privacy. Hand-encoding against a percent table is slow and error-prone, and the classic mistake is using encodeURIComponent on a whole URL, which escapes the :// and ? and produces a broken link. This tool makes the mode choice explicit so that error disappears. Privacy matters because URLs routinely carry session IDs, tokens and private query parameters; nothing you paste here leaves your device, so decoding a production URL from a log file carries no exposure risk. It is free, instant and requires no signup, which is exactly what you want when a request is failing and the clock is ticking. A few practical traps. First, pick the mode deliberately: encodeURIComponent is for values (it escapes & = ? / so they cannot break the query string), encodeURI is for complete URLs (it leaves those delimiters intact). Second, watch out for double encoding: if you paste an already-encoded URL into the encoder, every % becomes %25, and the server will receive literal %20 text instead of spaces. Third, browsers display decoded URLs in the address bar, so a copied link may look fine while the underlying value is still escaped, which confuses debugging. Fourth, some servers follow strict RFC 3986 rules and reject characters that older browsers leave alone, so when a request is rejected as malformed, stricter encoding is the first thing to try.
Troubleshooting & Common Issues
Decoded URL shows `+` instead of spaces
`application/x-www-form-urlencoded` uses `+` for space (mostly in HTML form submissions), while percent-encoding uses `%20`. Both are valid; most decoders handle one but not the other. Replace `+` with `%20` before decoding if your source is a form body, or use a form-aware decoder.
Special characters like `é` or `😀` become `?` or garbage
Percent-encoding operates on bytes, and non-ASCII characters produce multi-byte sequences in UTF-8. If your source was encoded with ISO-8859-1 (a legacy default in older systems), the decoder's UTF-8 pass produces mojibake. Re-encode the source as UTF-8 before decoding.
I encoded a full URL and now the `://` is broken
You used `encodeURIComponent` on the whole URL — it escapes `/` and `:` too. For a complete URL use `encodeURI`, which preserves reserved characters. For individual query-parameter values, keep using `encodeURIComponent`.
The server rejects my encoded value as malformed
Some servers strictly follow RFC 3986 and reject characters that older browsers leave unescaped (like `~` or `!`). Enable "strict mode" if your encoder supports it, or manually encode those characters using percent-hex values.
Frequently Asked Questions
When do I need to URL encode?
You need URL encoding whenever data passing through a URL contains special characters — spaces become %20, ampersands become %26, etc. This is critical for query strings, form submissions, and API requests.
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters that have special meaning (like / and ?). encodeURIComponent encodes everything including those special characters, making it suitable for individual query parameter values.
Why do spaces appear as %20 or +?
In URL encoding, spaces can be represented as %20 (standard percent-encoding) or as + (application/x-www-form-urlencoded format used in HTML forms). Both are valid; %20 is more universal and recommended for path segments.
Is my data sent to a server?
No. Encoding and decoding run entirely in your browser. URLs containing tokens, session IDs, or query parameters with private data stay on your device.
What characters do I need to encode in a URL?
Reserved characters that have special meaning — space, &, ?, =, #, /, +, % — must be encoded when used inside a parameter value. Unicode characters (emoji, accented letters, CJK) also need encoding because URLs are ASCII-only.
Why does my decoded text look like garbled symbols?
Almost always a UTF-8 vs ISO-8859-1 mismatch. The encoder operates on bytes, and the same byte sequence decodes differently under different character sets. Re-encode your source as UTF-8, then decode.
Can I encode the same string twice (double-encoding)?
Yes — useful when a value passes through a proxy that decodes once before forwarding. Encode once, then encode the result again; the % characters from the first pass become %25 in the second pass.
Guides & Further Reading
Agent-Native: Stop Making Your Agent Click Through the UI
Most tools teach an agent to operate your interface. Agent-Native argues the interface was never the API. Define a capability once and the agent, React, HTTP, MCP, A2A and the CLI all call the same function.
12 min readBrowserSkill: Let AI Agents Drive the Browser You Are Already Logged Into
Most browser agents open a clean browser that is signed into nothing. BrowserSkill connects your agent to the profile you already use, in a separate window, borrowing tabs only when it asks. Here is the architecture, the safety switches, and the question you should ask before installing it.
12 min readURL Encoding Explained: How to Handle Special Characters in URLs
URL encoding converts special characters into a format that can be transmitted over the internet. Learn which characters need encoding and how percent-encoding works.
6 min readRelated Tools
Base64 Encoder Decoder Online
Encode text or binary data to Base64 or decode Base64 strings back to text. Handles UTF-8, emoji, Base64URL (JWT-style), and data URIs entirely in your browser.
JSON Formatter Online
Format, beautify, and validate JSON with syntax highlighting, a collapsible tree view, auto-fix for trailing commas and single quotes, search, and JSON-to-XML/CSV/YAML conversion.
Slug Generator
Convert any title into a clean, SEO-friendly URL slug. Handles accented characters, custom separators, lowercase toggling, and length limits for WordPress, Ghost, and static sites.
HTML Minifier Online
Compress HTML by stripping comments, whitespace, and redundant attributes. Cuts typical file size by 25-40% to improve Core Web Vitals and speed up page loads without changing rendering.
Was this tool helpful?