URL Encoder/Decoder: Safely Encode and Decode URLs
A space in a URL, an ampersand in a query string, or an accented character in a path can quietly break a link, corrupt a request, or hand an attacker an opening. URL encoding solves this by translating unsafe characters into a format any server and browser can read reliably. Our URL Encoder / Decoder lets you convert both directions instantly, right in your browser.
What URL encoding actually does
URLs are only allowed to contain a limited set of characters: letters, digits, and a handful of symbols like hyphens and slashes. Anything outside that set, including spaces, commas, quotes, and non-English letters, has to be percent-encoded. Percent-encoding replaces each unsafe byte with a percent sign followed by its two-digit hexadecimal value. A space becomes %20, an ampersand becomes %26, and a question mark becomes %3F. This is why you sometimes see long strings of percent signs in a link you copied from a search engine.
Here is a concrete example. Suppose you want to pass the search term cafรฉ & bar as a query parameter. Sent raw, the ampersand would be read as a separator between two parameters and the request would fall apart. Encoded, it becomes safe to transmit:
Encoded: https://example.com/search?q=caf%C3%A9%20%26%20bar
Notice that the accented รฉ becomes %C3%A9. That is because modern encoding first converts the character to its UTF-8 bytes, then percent-encodes each byte, which is exactly what the tool does for you.
How to use the tool
- 1.Open the URL Encoder / Decoder and paste your text or URL into the input box.
- 2.Choose Encode to make a string URL-safe, or Decode to turn percent-encoded text back into readable characters.
- 3.Read the converted result in the output area, which updates as you type.
- 4.Copy the result with one click and paste it into your code, browser, or API client.
Who needs it and when
URL encoding shows up constantly once you know where to look. These are the situations where reaching for a quick converter saves real time:
- โข API developers โ building query strings and OAuth callback URLs where a stray symbol causes a 400 error.
- โข Marketers โ crafting UTM tracking links that carry campaign names with spaces and special characters.
- โข Support and QA โ decoding a mangled link from a bug report to see what a user actually clicked.
- โข Data engineers โ cleaning up scraped or logged URLs before storing or comparing them.
- โข Anyone debugging โ reading a webhook payload or redirect chain that arrived double-encoded.
Common mistakes to avoid
The most frequent trap is double encoding: running an already-encoded string through the encoder again turns %20 into %2520, because the percent sign itself gets encoded. If you see stray %25 sequences in a broken link, that is almost always the cause, and decoding once usually fixes it.
Another mistake is encoding an entire URL when you only meant to encode one value. Encoding a full address turns the slashes and colon into %2F and %3A, which breaks the structure. As a rule, encode individual query parameter values, not the scheme, host, or path separators. When in doubt, encode the smallest piece that contains the risky characters and leave the surrounding URL alone.
Try it now โ 100% free, no sign-up required
Open URL Encoder / Decoder โWhy a browser-based tool keeps your data private
Everything happens locally in your own browser using standard JavaScript encoding functions. Nothing you paste is uploaded, logged, or sent to a server, which matters when your URLs contain access tokens, session identifiers, internal hostnames, or customer data. You can even keep using the converter offline once the page has loaded, and closing the tab leaves no trace behind. For related tasks you can pair it with our other developer guides and tools.
Frequently Asked Questions
What is the difference between URL encoding and Base64?
URL encoding makes text safe to place inside a URL by escaping specific unsafe characters, and the result usually still resembles the original. Base64 converts arbitrary binary data into a compact ASCII string that looks nothing like the source. Use URL encoding for query strings and paths, and Base64 for embedding files or binary blobs.
Why does a space sometimes become a plus sign instead of %20?
In the older application/x-www-form-urlencoded format used by HTML form submissions, spaces are encoded as a plus sign. In standard percent-encoding for URL paths and modern query strings, a space becomes %20. Both are valid in their own context, but they are not interchangeable everywhere, so match the format your target system expects.
Is it safe to decode a suspicious link?
Yes. Decoding only reveals the human-readable version of the text; it does not visit the URL or execute anything. That makes the decoder a handy way to inspect where a shortened or obfuscated link actually points before you decide to open it.
Does encoding handle emoji and non-Latin scripts?
It does. Characters like emoji, Arabic, or Chinese are first converted to their UTF-8 byte sequence and then percent-encoded, producing several %XX groups per character. Decoding reverses the process exactly, so you get the original characters back without any loss.