About URL Encoder and Decoder
This free URL encoder and decoder converts text to percent-encoding and back. It needs no sign-up and runs in your browser, so the URLs and values you paste are never uploaded.
A URL can only carry a small set of characters as they are: letters, digits and a few symbols. Everything else, such as a space, an accented letter, an ampersand inside a value or an emoji, has to be written as a percent sign followed by two hexadecimal digits for each byte. A space becomes %20, an é becomes %C3%A9, and an ampersand in a value becomes %26. That is percent-encoding, also called URL encoding.
The tool has two encoding modes that match the two JavaScript functions of the same names. Component mode (encodeURIComponent) encodes every character that has a meaning in a URL, and is the right choice for a single value such as a search term in a query string. Full URL mode (encodeURI) leaves the structure characters / ? & = # alone, so you can encode a whole address that contains spaces or non-English letters without breaking it. Decode mode reverses the process and reports a malformed sequence instead of guessing.
A table of query parameters is shown beside the result, with each key and value decoded, which is handy for reading long tracking URLs. A percent-encoding chart of the special characters is one click away.
How to use URL Encoder and Decoder
- Choose Encode to percent-encode text, or Decode to turn an encoded string back into text.
- Paste your text or URL into the box. The result appears as you type.
- When encoding, choose Component (encodeURIComponent) for one value, or Full URL (encodeURI) for a whole address that should keep its slashes, question mark and ampersands.
- Tick Space as + if the value goes into an HTML form style query string. When decoding, tick + means space for the same kind of data.
- Read the Query parameters table to see each key and value of a URL decoded.
- Use Show percent-encoding chart to look up the code for a character, then Copy to take the result.
Features
- Encode and decode in one tool, with the result updating as you type.
- Two encoding modes: Component (encodeURIComponent) and Full URL (encodeURI).
- UTF-8 aware, so accented letters, Bangla, Chinese and emoji become the correct multi-byte percent sequences.
- Space as %20 or as +, for forms and for URLs.
- Decode with the option + means space.
- A clear error, Input contains an invalid percent sequence, when something like %G1 or a stray % is found.
- Query parameters table that decodes every key and value of a URL or a bare query string.
- Percent-encoding chart of common special characters, with the reserved ones marked.
- One-click copy of the result.
Worked examples
hello world & more=1?x/y, Component mode gives hello%20world%20%26%20more%3D1%3Fx%2Fy
Every space, ampersand, equals sign, question mark and slash is encoded, so the whole string is safe as one value.
https://example.com/a b?q=café&x=1#top, Full URL mode gives https://example.com/a%20b?q=caf%C3%A9&x=1#top
Only the space and the é change. The slashes, colon, question mark, ampersand, equals sign and hash keep their meaning.
https://example.com/a b?q=café&x=1#top, Component mode gives https%3A%2F%2Fexample.com%2Fa%20b%3Fq%3Dcaf%C3%A9%26x%3D1%23top
The same address in Component mode is no longer a working URL. Component mode is for values, not for whole addresses.
a b, Component mode with Space as + gives a+b
The plus form is used by HTML forms (application/x-www-form-urlencoded).
caf%C3%A9%20au%20lait, Decode gives café au lait
%C3%A9 is the two UTF-8 bytes of é.
a+b%2Bc, Decode with + means space gives a b+c
A literal plus sign is written %2B. Without the option the plus stays a plus.
Reserved characters and their codes
| Character | Encoded |
|---|---|
| ! | %21 |
| # | %23 |
| $ | %24 |
| & | %26 |
| ' | %27 |
| ( | %28 |
| ) | %29 |
| * | %2A |
| + | %2B |
| , | %2C |
| / | %2F |
| : | %3A |
| ; | %3B |
| = | %3D |
| ? | %3F |
| @ | %40 |
| [ | %5B |
| ] | %5D |
Which characters each mode leaves alone
| Characters | Component (encodeURIComponent) | Full URL (encodeURI) |
|---|---|---|
| Letters A to Z, a to z and digits 0 to 9 | Kept | Kept |
| - _ . ! ~ * ' ( ) | Kept | Kept |
| ; , / ? : @ & = + $ # | Encoded | Kept |
| Space | Encoded as %20 | Encoded as %20 |
| Non-English letters and emoji | Encoded as UTF-8 bytes | Encoded as UTF-8 bytes |
| [ ] { } | \ ^ ` < > " % | Encoded | Encoded |
Good to know
Component or full URL: which one?
Use Component for one piece that you are inserting into a URL, such as a search term, a redirect target passed as a parameter, or a file name. If the value contains an ampersand or an equals sign and you do not encode it, it will break the query string. Use Full URL only when you already have a complete address that contains characters like spaces or accents and you want it to stay a valid, working URL.
Never run Component mode over a whole URL, and never run Full URL mode over a value that came from a user. The second mistake leaves ? # and & intact inside the value, which can change what the URL means.
Space as %20 or as +
In the path of a URL a space must be %20. In a query string produced by an HTML form, a space may also be written as +. Many servers accept both in queries, but not in paths, so %20 is the safe default. When you decode a form-encoded string, tick + means space, or the plus signs will stay as they are.
Double encoding
If you see %2520 in a URL, something encoded an already-encoded value: the % of %20 was itself encoded as %25. Decoding once gives %20, and decoding a second time gives a space. Encode a value exactly once, at the point where you build the URL.
Privacy: how it works
- The text and URLs you enter are processed by code in your browser tab. Nothing is sent to Ulkaa or to any other server, which you can confirm in the Network tab of your browser developer tools.
- That is useful because real URLs often carry tokens, email addresses and session identifiers in their query strings. You can inspect and decode them here without sending them anywhere.
Tips
- Decode a URL from a log or an email to see what a tracking link really contains. The Query parameters table lists each key and value.
- Encode the value, not the whole URL, when you build a link by hand with a parameter such as ?next=.
- If decoding fails, look for a bare % that was not meant as an escape, for example in 100% or in a copied sentence. Encode it as %25 first.
- Reserved characters are only a problem inside a value. In their normal place, a ? that starts the query or a & that separates parameters, they must stay as they are.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your text and URLs are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your text and URLs are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What is URL encoding?
It replaces characters that are unsafe in a URL with a % sign followed by two hexadecimal digits for each byte, so the URL stays valid. It is also called percent-encoding. For example, a space becomes %20.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps the characters that give a URL its structure, such as / ? & = and #. encodeURIComponent encodes them too, so it is meant for a single value. Use encodeURIComponent for query values and encodeURI for a whole address.
How do I decode a URL?
Choose Decode and paste the encoded text. Every %XX sequence is turned back into its character. Tick + means space when the text came from a form.
Why is a space %20 in one place and + in another?
%20 is the standard percent-encoding of a space. The plus sign is a shorthand used only in form-encoded query strings. In a URL path, use %20.
How are non-English characters encoded?
The character is converted to UTF-8 bytes and each byte is written as %XX. The letter é becomes %C3%A9 and the euro sign becomes %E2%82%AC. Emoji take four bytes, such as %F0%9F%98%80.
Why does decoding say there is an invalid percent sequence?
A % must be followed by two hexadecimal digits, and the bytes together must be valid UTF-8. A bare % in text, a cut-off string or an incorrectly encoded character causes this error.
What does %2520 mean?
It is a double-encoded space. %25 is an encoded percent sign, so %2520 decodes once to %20 and twice to a space. Encode only once to avoid it.
Which characters need to be encoded?
Anything outside letters, digits and - _ . ~ must be encoded when used as data. Reserved characters such as : / ? # [ ] @ ! $ & ' ( ) * + , ; = are encoded when they are part of a value rather than the URL structure.
Popular URL Encoder and Decoder pages
- URL Encoder OnlinePercent-encode a URL or a piece of text so it works as a link.
- URL Decoder OnlineTurn %20, %C3%A9 and other percent codes back into readable text.
- encodeURIComponent OnlineSee exactly what encodeURIComponent returns for any string.
- Percent-Encoding ChartLook up the %XX code of a special character and see which characters are reserved in URLs.