Encode special characters in URLs using percent-encoding, or decode percent-encoded URLs back to readable text. Instant and free.
| Character | Encoded | Description |
|---|---|---|
| Space | %20 | Whitespace |
| ! | %21 | Exclamation mark |
| # | %23 | Hash / Fragment |
| & | %26 | Ampersand (param separator) |
| = | %3D | Equals (key=value) |
| ? | %3F | Query string start |
| @ | %40 | At sign |
The Logrith URL Encoder converts text into a URL-safe format using percent-encoding, and decodes it back into readable text. This is essential whenever special characters, spaces, or non-ASCII text need to be safely included in a URL, query string, or API request without breaking the structure of the URL itself.
URLs can only safely contain a limited set of characters — letters, digits, and a small handful of symbols. Everything else, including spaces, ampersands, question marks, and accented or non-Latin characters, has to be converted into a special percent-encoded representation before it can be included in a URL without causing errors or unexpected behavior. This conversion process is called URL encoding or percent-encoding, and this tool handles it instantly in both directions.
Percent-encoding replaces an unsafe character with a percent sign followed by the character's hexadecimal byte value. A space, for example, becomes %20. An ampersand (&) becomes %26. A forward slash becomes %2F. This encoding scheme lets any character, including ones outside the basic ASCII set, be represented using only the limited character set that's guaranteed to be safe inside a URL. When a browser or server receives a percent-encoded URL, it decodes these sequences back into their original characters before processing the request.
JavaScript provides two related but different encoding functions, and picking the right one matters. encodeURI is designed for encoding a complete URL — it leaves structural characters like /, ?, &, and # untouched, since those characters have special meaning in the overall URL structure and shouldn't be encoded if you're encoding an entire address. encodeURIComponent, by contrast, is designed for encoding a single component or value — like one query parameter's value — and it does encode those structural characters, since within a single value, a literal & or ? should be treated as data rather than as part of the URL's structure. As a general rule, use encodeURIComponent when encoding a value that will be placed inside a query string, and reserve encodeURI for encoding an entire URL that already has its structure in place.
Decoding reverses the process, converting percent-encoded sequences back into their original, human-readable characters. This is useful when you've copied a URL from a browser address bar or server log and it's full of %20s and %2Fs that are hard to read at a glance — decoding it instantly reveals the actual text or parameter values being passed, which is especially helpful when debugging why a particular link or API call isn't behaving as expected.
All encoding and decoding happens locally in your browser using JavaScript's built-in functions — nothing you enter is sent to a server or stored. This makes the tool safe to use even with sensitive query values, API parameters, or tokens you don't want passing through a third-party service.
One issue that trips up developers regularly is double encoding — accidentally encoding a string that's already been encoded once, which turns the percent signs from the first encoding pass into their own encoded form (%25) and produces a broken, unreadable result when decoded incorrectly or passed to a system expecting single encoding. This typically happens when a value gets encoded both on the client side and again on the server side, or when a URL is constructed by concatenating an already-encoded parameter into a string that then gets encoded again as a whole. If a decoded URL still contains %25 sequences or other garbled percent signs, double encoding is usually the cause, and the fix is to decode it twice, or better, to trace back through the code and remove the redundant encoding step.