Home › Dev Tools › URL Encoder

Free URL Encoder & Decoder

Encode special characters in URLs using percent-encoding, or decode percent-encoded URLs back to readable text. Instant and free.

✅ Free⚡ Instant🔗 encodeURIComponent📋 Copy Output

URL Encoder / Decoder

Quick Reference — Common Encodings

CharacterEncodedDescription
Space%20Whitespace
!%21Exclamation mark
#%23Hash / Fragment
&%26Ampersand (param separator)
=%3DEquals (key=value)
?%3FQuery string start
@%40At sign

Frequently Asked Questions

What is URL encoding?
URL encoding (percent-encoding) replaces unsafe ASCII characters with a % followed by their hex value. It ensures special characters in URLs don't break the URL structure. E.g., a space becomes %20.
What's the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL and preserves URL structural characters like /, ?, &, #. encodeURIComponent encodes a URL component (like a query parameter value) and also encodes these structural characters. Use encodeURIComponent for values in query strings.
When do I need URL encoding?
You need URL encoding when passing user input as URL query parameters, when building API requests with special characters in values, or when creating redirect URLs that contain query strings.
Is my text sent to a server when encoding or decoding?
No, both encoding and decoding happen instantly in your browser using JavaScript's built-in functions. Nothing you enter is transmitted anywhere.
What characters get encoded?
Any character outside the small set considered "safe" in URLs — letters, digits, and a handful of symbols like -, _, ., and ~ — gets converted to its percent-encoded form, including spaces, ampersands, question marks, and non-ASCII characters.
Can I decode an already-encoded URL to read it?
Yes, paste the encoded URL or string into the decode field and it will convert all percent-encoded sequences back into their original readable characters.

About the URL Encoder/Decoder Tool

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.

How Percent-Encoding Works

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.

encodeURI vs. encodeURIComponent: Which to Use

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.

Common Situations That Require URL Encoding

Decoding: Reading an Encoded URL

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.

Step-by-Step: How to Encode or Decode a URL

1. Paste your text or URLEnter the text you want to encode, or the encoded string you want to decode.
2. Choose the operationSelect Encode or Decode depending on your direction.
3. Pick the right functionUse Component encoding for query parameter values, or full URI encoding for a complete address.
4. Copy the resultCopy the processed text to use in your code, URL, or API request.

Privacy

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.

A Common Mistake: Double Encoding

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.

Popular Searches

url encoder online url decoder free percent encoding tool encodeuricomponent online url escape tool query string encoder decode url online free url encode decode tool