URL Encoder / Decoder
Percent-encode URL components or decode encoded strings. Supports encodeURIComponent and encodeURI modes for query parameters, full URLs, and handles Unicode characters correctly.
Why Use URL Encoder / Decoder?
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
- 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.
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
URL encoding (also called percent-encoding) is the process of replacing special characters in a URL with a '%' followed by their hexadecimal value, ensuring URLs are transmitted correctly across the internet. The URL Encoder/Decoder converts text to and from percent-encoded format. URL encoding replaces unsafe characters with a '%' followed by their hexadecimal value, ensuring that URLs are transmitted correctly across the internet. This is essential when building query strings, passing parameters to APIs, encoding form data, or debugging URLs with special characters. Reserved characters like spaces, ampersands (&), question marks (?), equals signs (=), and hash symbols (#) have special meaning in URLs and must be encoded when used as data values. Our tool supports both `encodeURIComponent` (for query parameters) and full URL encoding, handling all international characters and emoji properly.
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 you're passing data through URLs that 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 encoding 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.
Related Tools
Base64 Encoder / Decoder
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
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
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?