URL Encoder / Decoder
/url-encoder/
Related tools
Comments
About this tool
Why URL encoding is needed
Copy a URL containing Korean, accented letters or other non-ASCII text into a chat or document and it often turns into an unreadable run like %ED%99%8D. Nothing is broken; this is URL encoding, formally called percent-encoding. URLs were defined to use only English letters, digits and a few symbols, so any other character is sent as its byte values, each written as % followed by two hex digits.
Read moreShow less
For developers it is an everyday issue. Putting a search term or redirect address into a query parameter, reading request URLs in server logs, or figuring out why a shared link was cut off and stopped working all require seeing encoded and decoded results quickly. This URL encoder runs the browser's built-in encodeURIComponent and encodeURI and their matching decode functions directly, so what you see here is exactly what your JavaScript code will produce.
Percent-encoding rules and RFC 3986
URL syntax is defined by RFC 3986, published in 2005. It treats upper and lower case letters, digits and the four symbols - . _ ~ as unreserved characters allowed anywhere, while : / ? # [ ] @ and ! $ & ' ( ) * + , ; = are reserved characters that express the structure of a URL. A reserved character used literally rather than structurally must be encoded, and characters outside the list, such as Korean, are converted to %XX for each UTF-8 byte. A Korean syllable is 3 bytes, so 가 becomes %EA%B0%80, and the name 홍길동 becomes nine groups: %ED%99%8D%EA%B8%B8%EB%8F%99.
The difference between Value mode (encodeURIComponent) and Full URL mode (encodeURI) is whether reserved characters are kept. 'a b&c=d' becomes a%20b%26c%3Dd in Value mode, with & and = encoded, but a%20b&c=d in Full URL mode, where & and = remain. Encoding the complete address https://scottools.com/검색?q=서울 맛집&page=1 (Korean for 'search' and 'Seoul restaurants') in Full URL mode gives https://scottools.com/%EA%B2%80%EC%83%89?q=%EC%84%9C%EC%9A%B8%20%EB%A7%9B%EC%A7%91&page=1, where the structure survives and only the Korean text and the space change. The same address in Value mode becomes one string starting with https%3A%2F%2F, ready to be placed as a parameter value inside another URL.
There are less well-known differences too. Neither function encodes ! ' ( ) *, even though RFC 3986 classifies them as reserved. Decoding is asymmetric as well: decodeURI leaves sequences that stand for reserved characters, such as %2F and %3F, undecoded, while decodeURIComponent turns them into / and ?. This tool converts + to a space before decoding, because the HTML form submission format (application/x-www-form-urlencoded) sends spaces as +.
Which URL encoding mode to choose
For a value that goes into a single query parameter, such as a search term, a return address after login or a user name, Value mode is right. If an & or = inside the value is not encoded, the server reads the parameter as ending at that point and the value is cut off. When a finished URL breaks because it contains non-ASCII text or spaces, tidy it with Full URL mode.
Marketers and bloggers who want to read the garbled text in a shared link can choose Decode and paste the URL as it is. When reading whole URLs, as in server logs or referrer analysis, decoding in Value mode unpacks every % sequence and is easiest to read. If you plan to use the decoded URL as a link again, decode in Full URL mode so structural characters like %2F are preserved and the meaning does not change.
Double encoding and decoding errors
The most common mistake is encoding an already encoded value a second time. % itself is encoded, so %ED encoded again in Value mode becomes %25ED. Repeated %25 in a URL is a sign that something encoded it twice. Conversely, a literal + in a decoded value turns into a space, so a value that must keep a plus sign has to be encoded as %2B.
If % is not followed by two hex digits, or only part of a multi-byte character remains so the bytes cannot be read as UTF-8, the browser functions throw a URIError and this tool reports invalid % encoding. Korean URLs encoded in EUC-KR, an older Korean encoding used by legacy systems, have different bytes and cannot be decoded by this UTF-8-based tool. Conversion happens only in this browser and nothing is sent to a server; your input and options are kept in this browser's localStorage for next time, and Reset clears them.
Popular tools
FAQ
How do I decode a URL like %ED%99%8D into readable text?
Choose Decode and paste the URL or value as it is. %ED%99%8D%EA%B8%B8%EB%8F%99 decodes to the Korean name 홍길동. If you only want to read a whole URL, Value mode decodes every % sequence.
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent also encodes reserved characters such as & = ? / # : and is meant for a single parameter value. encodeURI keeps the characters that form URL structure and is meant for tidying a complete URL. Using encodeURI on a parameter value lets an & inside it cut the value short.
Is a space encoded as %20 or +?
In RFC 3986 percent-encoding a space is %20, while + represents a space in the HTML form submission format. This tool uses %20 when encoding and turns both %20 and + into spaces when decoding.
Why does %25 keep appearing in my URL?
Encoding % gives %25, so an already encoded value was encoded again. Decoding once turns %25ED back into %ED. Find the place in your code where encoding happens twice and keep only one.
Why do I get an invalid % encoding error?
It appears when % is not followed by two hex digits, or when a multi-byte character was cut in the middle and cannot be read as UTF-8. Check that the end of the URL was not lost when copying. Old URLs encoded in EUC-KR can cause this error too.
Is the URL I enter saved?
It is not sent to a server; conversion uses the browser's built-in functions on this device only. Your input and options are kept in this browser's localStorage so you can continue later, and Reset clears them.