URL Encoder & Decoder
Decode percent-encoded URLs back to readable text, or encode URLs, query strings and parameters safely, with a parameter grid and batch mode — all client-side.
The three modes and when to use each
Encoding a whole URL and encoding one value inside it are different jobs, and using the wrong one is the usual cause of broken links. The tool has a mode for each case.
- Smart URL Mode (Default): When a full URL is detected, the engine preserves the protocol and domain (e.g.,
https://domain.com/path) and strictly encodes the query parameters. This prevents broken, unclickable URLs. - Raw String Mode: Forces strict RFC 3986 encoding across the entire input block, converting every unsafe character (including slashes and colons).
- Parameter Forensics: Automatically detects query strings (
?key=value) and generates an editable visual breakdown of payload data — edit any key or value and hit Re-encode to rebuild the URL instantly. - Batch Mode: Paste a list of URLs or strings, one per line, and encode or decode every line at once.
Webhook Debugging
Ensure complex payloads carrying raw JSON or XML objects via URL parameters do not break routing logic by safely encoding the transmission string.
UTM Tracking Generation
Securely encode advanced marketing campaign parameters, ensuring spaces and special characters map perfectly into analytics dashboards without data truncation.
Reading Server Logs Safely
Decode the percent-encoded paths and query strings in web server logs to see exactly what was requested, or encode untrusted text before it is placed in a URL so it cannot change the link's meaning.
Quick Testing Templates
Test the URL encoding engine instantly. Click the templates below to load sample payloads directly into the workspace.
URL encoding reference: characters and their percent codes
What each special character becomes when it is percent-encoded for a URL (RFC 3986). Letters, digits and - . _ ~ never need encoding. Non-ASCII characters are first turned into UTF-8 bytes, and each byte becomes one %XX.
| Character | Encoded | Notes |
|---|---|---|
| (space) | %20 | Space: %20 in a path or value; + only in HTML form data |
| ! | %21 | Strict RFC 3986 form. encodeURIComponent, and this tool, leave it as is, which URLs allow |
| " | %22 | |
| # | %23 | Starts the fragment; everything after it is not sent to the server |
| $ | %24 | |
| % | %25 | Must always be encoded, or it starts a bogus escape |
| & | %26 | Separates query parameters |
| ' | %27 | Strict RFC 3986 form. encodeURIComponent, and this tool, leave it as is, which URLs allow |
| ( | %28 | Strict RFC 3986 form. encodeURIComponent, and this tool, leave it as is, which URLs allow |
| ) | %29 | Strict RFC 3986 form. encodeURIComponent, and this tool, leave it as is, which URLs allow |
| * | %2A | Strict RFC 3986 form. encodeURIComponent, and this tool, leave it as is, which URLs allow |
| + | %2B | Encode it in a query value, or a server may read it as a space |
| , | %2C | |
| / | %2F | Path separator |
| : | %3A | |
| ; | %3B | |
| < | %3C | |
| = | %3D | Separates a parameter name from its value |
| > | %3E | |
| ? | %3F | Starts the query string |
| @ | %40 | |
| [ | %5B | |
| \ | %5C | |
| ] | %5D | |
| ^ | %5E | |
| ` | %60 | |
| { | %7B | |
| | | %7C | |
| } | %7D | |
| ~ | ~ | Unreserved: never needs encoding |
| é | %C3%A9 | Non-ASCII: encoded as its UTF-8 bytes |
| € | %E2%82%AC | Three UTF-8 bytes |
| 中 | %E4%B8%AD | Three UTF-8 bytes |
Whether a character must be encoded depends on where it sits: / is fine in a path but must be encoded inside a query value that is itself a URL. Encode each value on its own, with encodeURIComponent in JavaScript or urllib.parse.quote in Python, rather than encoding a whole finished URL.
Engineering FAQ
Smart Mode attempts to parse the string using the JavaScript URL API, extracting and modifying the URLSearchParams to safely encode query parameters while preserving the base protocol structure. Raw Mode bypasses URL parsing and applies a blanket encodeURIComponent() to the entire string.
URLs frequently contain highly sensitive session tokens, API keys, and temporary authorization grants within their parameters. Processing this data entirely within your local browser DOM guarantees zero-trust security—your keys are never sent to or logged by our servers.
When a valid URL is detected, the engine intercepts the search property of the parsed URL object. It iterates through the URLSearchParams map, automatically escaping HTML entities to prevent DOM injection, and populates an editable breakdown grid. Edit any key or value directly and click Re-encode to rebuild both the readable and percent-encoded versions of the URL from your changes.
Batch Mode treats each line of the input as an independent item. Every non-empty line is parsed and encoded or decoded on its own — if a line is a full URL, only its query parameters are transformed (same logic as Smart Mode); otherwise the whole line is encoded or decoded as a raw string. Blank lines and line order are preserved, so you can paste a list of endpoints or tracking links and process them all in one pass.
HTML forms send data as application/x-www-form-urlencoded, where a space is written as + and a real plus as %2B. Most servers decode query strings that way, but decodeURIComponent and URL paths do not, so q=hello+world can arrive as "hello+world". Tick + means space to decode form data: in a full URL only the query is treated as form data, so a + in the path or the fragment stays a plus. In Raw mode the same option encodes spaces as +.
Two encodings, one confusing name
"URL encoding" refers to two different schemes that disagree about the space character, and mixing them up is behind a great many broken links. RFC 3986 percent-encoding represents a space as %20. The application/x-www-form-urlencoded format used by HTML forms represents it as +, and a literal plus as %2B.
Both are correct in their own place. Query strings are form-decoded by most servers, so + reads as a space there — which is why search URLs are full of them. Paths are percent-decoded, so in a path + is a literal plus character. Our URL encoding guide works through the reserved-character rules and the double-encoding signature in detail.
The C++ filename bug
A file named C++ notes.pdf encodes to C%2B%2B%20notes.pdf. If any layer form-decodes that path rather than percent-decoding it, the escaped pluses become spaces and the key no longer matches. "Uploads fine, 404s on download" is almost always this.
%2520 means encoded twice
Encoding is not idempotent: % itself encodes to %25, so running an encoder over already-encoded text produces %2520 from a space. Seeing it in a log tells you two layers each believed they were responsible for encoding.
Smart vs Raw mode
Smart mode parses the input as a URL and encodes only the query values, preserving the protocol, host and path so the result stays clickable. Raw mode applies strict component encoding to the whole string — correct when the input is a single value rather than a URL.
Encode per component, never the whole URL
The rule that resolves most remaining questions: encoding belongs to individual values before the URL is assembled, because only then does the code know which characters are data and which are structure. Encoding an already-assembled URL cannot distinguish them, and the consequence is a parameter-injection bug:
"/search?q=" + encodeURI("a=1&admin=true")yields two parameters —qand an attacker-suppliedadmin.encodeURIComponenton the same value yieldsa%3D1%26admin%3Dtrue: one parameter, correctly escaped.
In practice, prefer URLSearchParams over either function. It escapes each value correctly, handles repeated keys, and cannot produce an injection because it never treats your data as syntax. Its one quirk is that it form-encodes, so spaces come out as + — which, in a query string, is exactly right.
One thing to avoid entirely: decoding repeatedly until the string stops changing. That is how path-traversal filters get bypassed, because %252e%252e%252f passes a check for ../ and then becomes ../ after a second decode. Decode exactly once, then validate.
The parameter grid and batch mode
When a URL has a dozen query parameters, reading it as one string is the hard way. The parameter grid breaks a detected query into editable key/value rows: change a value, add a parameter, remove one, and Re-encode rebuilds both the readable and the percent-encoded forms of the URL. Batch mode takes a list of URLs, one per line, and encodes or decodes every line independently — useful for a column of tracking links pulled out of a spreadsheet.
All of it happens in the page. URLs frequently carry session tokens, signed parameters and temporary authorisation grants in their query strings, so nothing you paste here is transmitted anywhere.
Deployment Changelog
- v1.6.0 A "+ means space" option for form data: decoding turns + into a space in query values (a full URL's path and fragment keep their literal +), and Raw mode encodes spaces as +.
- v1.5.0 A line-endings option: multi-line text can be encoded with CRLF line breaks (%0D%0A); batch mode still encodes each line on its own.
- v1.4.1 A bare value that is not a URL (no scheme, no path structure) is now encoded as a component, so
&,=and#are percent-encoded instead of being left to change the meaning of a query string. Relative paths keep their separators as before. - v1.4.0 Made the Parameter Forensics grid editable (edit a key/value and click Re-encode to rebuild the URL) and added a Batch Mode for encoding/decoding a list of URLs at once.
- v1.3.0 Added file upload and drag-and-drop to both panes.
- v1.2.1 Enhanced error handling UX. If a URI decode error occurs, the original string is preserved in the Plain Text viewer to allow for immediate debugging.
- v1.2.0 Added interactive Quick Testing Templates and expanded the forensic documentation panel.
- v1.1.0 Engineered the Parameter Forensics grid to automatically parse and visualize query string arrays.
- v1.0.0 Initial deployment of the dual-engine URL encoder utilizing strict client-side evaluation.