URL Encoder
Encode or decode URLs.
How to URL-Encode and Decode
Paste text or a URL
Enter a string with spaces or special characters, or an encoded URL to decode.
Encode or decode instantly
Percent-encoding is applied or reversed in your browser.
Copy the safe result
Use the output in links, query parameters and API calls.
Why URLs need encoding at all
A URL may only contain a limited set of characters, and several of them have structural meaning: `?` starts the query, `&` separates parameters, `#` starts the fragment, `/` separates path segments. A value containing any of these would be misread as structure rather than data.
Percent-encoding solves this by replacing a character with `%` and its byte value in hexadecimal. A space becomes `%20`, an ampersand `%26`. The URL stays parseable and the value survives intact.
Encoding a whole URL or a single value
These are different operations and using the wrong one is the most common mistake here. Encoding a complete URL must leave the structural characters alone, or the address stops working. Encoding a single parameter value must encode everything, including those characters, or the value breaks the URL it is placed into.
The rule follows from what you have: if you are handling a value that will go into a parameter, encode everything. If you are handling an assembled address, encode only what is unsafe. Encode the parts, then assemble โ never assemble, then encode.
Double encoding
Encoding an already-encoded string turns `%20` into `%2520`, because the percent sign itself gets encoded. The result usually still works as a URL and delivers the wrong value, which makes this a bug that reaches production more often than it should.
The signature is unmistakable once you know it: `%25` appearing throughout a URL, or a parameter arriving with visible `%20` sequences in its text. Decoding twice recovers the original and confirms the diagnosis.
Spaces, plus signs and forms
A space can be `%20` or `+`, depending on context. Form submissions historically encode spaces as `+`, while the general percent-encoding rules use `%20`. Both appear in the wild, which means a decoder has to know which convention produced the string.
The practical consequence: a literal plus sign in a value must always be encoded as `%2B`. Otherwise a search for 'C++' or a phone number beginning `+90` arrives with spaces where the plus signs were.
Non-ASCII and privacy
Characters outside ASCII are encoded as their UTF-8 bytes, so a single Turkish or Cyrillic character becomes two percent-escapes and an emoji becomes four. This is why a short phrase can produce a startlingly long URL โ the encoding is correct, not broken.
Encoding and decoding run in your browser. URLs frequently carry session tokens, search terms and identifiers, and pasting those into a server-side tool means handing them over. Nothing is transmitted here.