Best Free URL Encoder and Decoder: Encode and Decode URLs Instantly
Encode and decode URLs with a free browser-based tool — understand percent encoding, fix broken links, and debug query strings without writing code.
Try it yourself — free & instant
Every tool mentioned in this article is available on Xevon Tools. No sign-up, no uploads, no watermarks.
Browse all 150+ toolsWhat is URL encoding and why does it exist
URLs can only contain a limited set of characters. Letters, numbers, and a handful of symbols like hyphens and underscores are safe. But what happens when a URL needs to include a space, an ampersand, a question mark, or characters from non-Latin scripts? These characters have special meanings in URL syntax or are simply not allowed.
URL encoding (also called percent encoding) solves this by replacing unsafe characters with a percent sign followed by their hexadecimal byte value. A space becomes %20. An ampersand becomes %26. A plus sign becomes %2B. This ensures the URL is valid and every character is transmitted correctly.
When you need URL encoding and decoding
Debugging broken URLs. A URL with unencoded special characters will break in browsers, APIs, and link checkers. If a link is not working, check whether it contains characters that should be percent-encoded.
Reading encoded query strings. When you inspect a URL from a web application, the query parameters often look like gibberish: ?q=hello%20world&category=books%20%26%20media. Decoding it reveals the actual values: q=hello world and category=books & media.
Building API requests. When constructing URLs for API calls, any user-supplied input in the query string must be encoded. An unencoded & in a search term would be misinterpreted as a parameter separator, breaking the request.
Sharing links with special characters. URLs containing non-ASCII characters (like accented letters or CJK characters) need encoding to work reliably across all browsers and platforms.
Parsing tracking parameters. Marketing UTM parameters, redirect URLs embedded in links, and affiliate tracking codes are all URL-encoded. Decoding them reveals the actual destination and attribution data.
How to encode and decode URLs online
- Open Xevon Tools' URL Encoder/Decoder.
- To encode, paste your plain text or URL fragment into the input area and click Encode. The tool converts all unsafe characters to their percent-encoded equivalents.
- To decode, paste a percent-encoded string and click Decode. The tool converts it back to readable text.
- Copy the result with one click.
The tool runs entirely in your browser using JavaScript's built-in encodeURIComponent and decodeURIComponent functions. Your data never leaves your device.
Characters that must be encoded
Here are the most commonly encoded characters and their percent-encoded forms:
- Space: %20 (or + in form data)
- Ampersand (&): %26
- Equals (=): %3D
- Question mark (?): %3F
- Hash (#): %23
- Plus (+): %2B
- Percent (%): %25
- Forward slash (/): %2F
- At sign (@): %40
- Colon (:): %3A
Characters that are safe in URLs and do not need encoding: A-Z, a-z, 0-9, hyphen (-), underscore (_), period (.), and tilde (~).
encodeURI vs encodeURIComponent
JavaScript provides two encoding functions, and using the wrong one is a common source of bugs:
encodeURI encodes a complete URL. It leaves characters that have structural meaning in URLs untouched: colons, slashes, question marks, hash signs, and ampersands. Use it when you have a full URL and want to encode only the unsafe characters within it.
encodeURIComponent encodes a single URL component — a query parameter value, a path segment, or a fragment. It encodes everything except letters, digits, and a few safe symbols. Use it when you are building a URL piece by piece and need to encode individual values.
The most common mistake is using encodeURI on a query parameter value. Because encodeURI does not encode & and =, special characters in the value can break the URL structure.
URL encoding vs Base64 encoding
These two encoding schemes serve completely different purposes:
URL encoding makes strings safe for URLs. It only converts characters that have special meaning in URL syntax. The output is still somewhat readable — hello%20world clearly contains "hello world."
Base64 encoding converts arbitrary binary data into a text string using a 64-character alphabet. It is designed for embedding binary content in text-based formats. The output is not human-readable.
Use URL Encoder/Decoder for anything URL-related. Use Base64 Encoder/Decoder for binary data, API tokens, and data URIs. They solve different problems and are not interchangeable.
Double encoding: a common pitfall
Double encoding happens when an already-encoded string is encoded again. The percent sign (%) gets encoded as %25, so %20 (a space) becomes %2520. The server then decodes it once and gets %20 instead of a space.
This typically happens when:
- A framework automatically encodes URL parameters, and the developer also encoded them manually.
- A URL is copied from one system to another, and the second system re-encodes it.
- A redirect URL is encoded, then the entire redirect URL (including the encoding) is encoded again.
If a URL looks like it has too many percent signs, try decoding it multiple times until it reads normally.
Debugging with related tools
URL debugging often involves more than just percent encoding. A typical debugging session might use:
- URL Encoder/Decoder to read and fix query parameters.
- Base64 Encoder/Decoder to decode tokens or embedded data found in URL parameters.
- JSON Formatter to pretty-print JSON payloads extracted from API URLs or webhook callbacks.
Having all three tools bookmarked creates a complete URL and data debugging toolkit that handles virtually any scenario you encounter in web development.
Privacy for your URLs
URLs often contain sensitive data — session tokens, user IDs, API keys, personal information in query parameters, and tracking data. A browser-based encoder and decoder processes everything locally. Your URLs and their embedded data never leave your device, which matters when you are debugging production systems with real user data.
URL encoding is one of those invisible mechanics of the web that every developer encounters. Understanding it saves hours of debugging and prevents subtle bugs that are notoriously hard to track down.
