URL Encoder / Decoder
The URL Encoder / Decoder converts text to and from URL percent-encoding. Encode a value so it’s safe to drop into a query string, or decode a messy %20-filled URL back into readable text. Choose “Component” for a single value or “Full URL” to keep the URL structure intact. Percent-encoding (RFC 3986) replaces each byte with % followed by its two-digit hexadecimal value, so a multi-byte UTF-8 character produces multiple %XX groups just like a reserved symbol does. JavaScript's encodeURIComponent leaves only the unreserved characters untouched — A–Z, a–z, 0–9, and - _ . ! ~ * ' ( ) — and escapes everything else, including the URL-structural characters : / ? # & = + $ , ; ; encodeURI additionally preserves that structural set so an entire URL stays parseable after encoding, which is exactly the distinction behind this tool's Component vs. Full URL modes.
Component encodes everything (for a single query value or path segment).
Percent-encodes or decodes text for URLs. Use “Component” for a single query value and “Full URL” to keep the URL structure. Everything runs in your browser — nothing is uploaded.
How This Tool Works
Pick Encode or Decode, choose Component (a single value) or Full URL, then type or paste your text. The result updates live and can be copied or swapped back as input with one click.
Formula & Method
URL encoding replaces characters that aren’t allowed in a URL with a “%” followed by their hexadecimal byte value (a space becomes %20). Component scope encodes reserved characters like & ? / = too; full-URL scope leaves those structural characters in place.
Example Calculation
With the default Full URL input https://example.com/search?q=hello world&lang=en, choosing Encode + Full URL calls JavaScript's encodeURI(), which only escapes characters outside its preserved set — here just the space, which becomes %20 — producing https://example.com/search?q=hello%20world&lang=en while : / ? & = are left untouched so the URL stays structurally valid. Switching to Component scope on the same text would also escape the & and =, since component encoding treats every character outside A–Z, a–z, 0–9, and - _ . ! ~ * ' ( ) as unsafe.
About the URL Encoder / Decoder
A URL can only safely carry a limited set of characters: letters, digits, and a few punctuation marks. Everything else, including spaces, accented letters, emoji, and characters that have a special job in a web address such as ?, &, =, and #, has to be written as a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and the letter e with an acute accent becomes %C3%A9. This tool converts text to that percent-encoded form and back again, so you can build a safe link or read an unreadable one.
The most important choice on the page is the scope. Component mode applies the rules for a single piece of a URL, such as one search term or one path segment, and escapes nearly everything, including slashes, question marks, ampersands, and equals signs. Full URL mode is meant for a whole address and leaves those structural characters alone, so https://example.com/a?b=c keeps its shape and only unsafe characters like spaces and accents are escaped. Picking the wrong one is the single most common reason a link breaks.
Developers building query strings, marketers assembling campaign links with long tracking values, support staff decoding a link a customer sent, and anyone debugging a redirect will use it. Encoding is not a security feature: it is a reversible formatting step, and anyone can decode the result. The sections below show how each mode behaves with real input, including the double-encoding trap and what a decode error looks like.
When to Use It
Building a safe search or tracking link
A marketer needs a link with a campaign parameter such as summer sale & clearance. Encoding just that value in Component mode gives summer%20sale%20%26%20clearance, which can be dropped after utm_campaign= without the ampersand splitting the parameter in two and silently cutting the name off.
Reading a messy link from an email
A customer pastes a link full of %20 and %2F sequences, and you cannot tell what page it points to. Choose Decode, paste it, and the readable text appears. Using Full URL scope for the decode keeps escaped separators encoded, which avoids creating a confusing, ambiguous address.
Passing a URL inside another URL
Login and redirect flows often carry a return address as a parameter, as in redirect=https://example.com/cart?id=5. Encode the inner address in Component mode first, so its slashes, question mark, and equals sign are escaped, and the outer URL will not mistake them for its own structure.
Handling non-English text in links
A site owner has a file named résumé v2.pdf and wants a working link. Full URL encoding converts the space and the accented letters while leaving the slashes in the path alone, giving r%C3%A9sum%C3%A9%20v2.pdf at the end, which every browser and server can interpret the same way.
How to Use It, Step by Step
- Choose the direction with the two buttons at the top left: Encode to turn readable text into percent-encoded form, or Decode to reverse it. The active button is highlighted.
- Choose the scope with the buttons beside them: Component for a single value, such as one query parameter or one path piece, or Full URL for a complete address whose separators must stay in place. A one-line hint below the buttons describes the active choice.
- Click into the large box, labeled "Text to encode" or "Text to decode" depending on the direction, and type or paste your text. The box starts with a sample web address.
- Read the result in the lower panel labeled Result. It updates as you type or when you press a mode or scope button. The result panel can be blank until you type or toggle something the first time.
- If the panel turns into a red message that the text cannot be decoded, look for a stray percent sign or a percent followed by something other than two hexadecimal digits, for example %zz, and correct it.
- Use "Swap · use result as input" if you want to feed the output back in the opposite direction. It copies the result into the input box and flips between Encode and Decode, keeping your scope setting.
- Press Copy above the result to put the output on your clipboard. Check it once more against the structure you expect, especially the characters : / ? & = and #, before pasting it into a link or code.
Understanding Your Results
Every encoded character is a percent sign and two hexadecimal digits that give a byte of the character's UTF-8 form. A simple ASCII character such as a space or ampersand is one byte, so one %XX group. Other characters take more bytes, which is why the e with acute accent produces %C3%A9 (two bytes) and a two-character word in Japanese produces six groups. The letters A-Z, a-z, digits, and the characters - _ . ! ~ * ' ( ) are left as they are in both modes.
In Component mode, all the other characters are encoded, so a value stays one unbreakable piece: : becomes %3A, / becomes %2F, ? becomes %3F, & becomes %26, = becomes %3D, + becomes %2B, and # becomes %23. In Full URL mode those characters, along with ; , @ $, remain, so the address can still be parsed. A quick check is to look for the characters you meant to keep. If a full address has lost its https:// or its question mark, you used the wrong scope.
Decoding mirrors this. Component decoding converts every valid %XX sequence back. Full URL decoding leaves sequences for reserved characters, such as %26, %2F, %3F, %23, and %3D, still encoded, because turning them into plain characters would change the meaning of the address. Decoding also does not turn a plus sign into a space; a plus remains a plus. Finally, if you encode text that already contains percent sequences, the percent signs themselves are encoded to %25, so %20 becomes %2520, the classic sign of double encoding.
More Worked Examples
One address, two scopes
Scenario: Text: https://example.com/search?q=hello world&lang=en, action: Encode, scope compared.
With Full URL scope the result is https://example.com/search?q=hello%20world&lang=en. Only the space changed, because the colon, slashes, question mark, equals signs, and ampersand are structural and are preserved. With Component scope the same text becomes https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den, in which every separator is escaped. That is correct when the whole address is a value inside another URL, but it is useless as a link on its own.
A value that contains an ampersand
Scenario: Text: coffee & cream: 50% off?, action: Encode, scope compared.
In Component scope the result is coffee%20%26%20cream%3A%2050%25%20off%3F, ready to place after q= in a query string. The ampersand is %26, the colon is %3A, the percent sign is %25, and the question mark is %3F. In Full URL scope the result is coffee%20&%20cream:%2050%25%20off?, which keeps the ampersand and question mark raw. Used in a query string, the raw ampersand would end the parameter early, so the search would receive only the word coffee.
Double encoding and a decode error
Scenario: Encode https://example.com/a%20b in Full URL scope; then decode 100% in either scope.
The first input already contains an escaped space. Encoding it again turns the percent sign into %25, so the output is https://example.com/a%2520b, which would be read as a literal percent-two-zero rather than a space. Do not encode text that is already encoded. For the second case, a lone percent sign has no two hex digits after it, so decoding 100% fails and the red message says the text cannot be decoded because of an invalid percent sequence.
Tips for Better Results
- Encode each query value separately in Component mode, then join the pieces with ? and & yourself. Encoding an entire assembled URL in Component mode escapes the separators and breaks the link.
- If a link looks double-encoded, with sequences like %2520 or %253A, decode it once and look again. Each decode pass removes a single layer of encoding.
- Plus signs need care. This tool encodes a space as %20 and does not convert a plus sign when decoding. If a link uses plus for spaces, as in HTML form submissions, replace each plus with a space yourself before decoding.
- When encoding a path with folder names, use Full URL for the entire path so the slashes stay, but encode a filename containing a slash or question mark on its own in Component mode.
- Check the very start of an encoded URL. If you see https%3A%2F%2F, the whole address was encoded as a component, which is right only if the address is meant to be inside another URL.
- For unreadable characters you cannot identify, decode the string and look at the result. A garbled mix of letters such as é usually means text that was encoded in the wrong character set earlier in the chain.
Common Mistakes to Avoid
- Encoding a complete URL in Component mode and then using it as a link. The colons and slashes are escaped, so browsers treat it as a relative path rather than an absolute address.
- Encoding a query value in Full URL mode. Ampersands, equals signs, and hash symbols are left alone, so a value like AT&T or C#, once placed in a URL, will be misread as separators.
- Encoding text twice. The percent sign is itself encoded the second time, producing %25 sequences that servers decode back only to the first layer of encoding.
- Expecting decode to work on any text containing a percent sign. A literal percent sign that is not followed by two hex digits, such as in 50% off, triggers the error. Encode it as %25 first.
- Treating percent-encoding as protection for sensitive data. Anyone can decode it in one step, so never use it to hide passwords, tokens, or personal information.
Assumptions and Limits
- The tool uses the browser's built-in encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions. They follow RFC 3986 closely but have a few behaviors worth knowing, such as leaving the characters ! ' ( ) * unencoded in the component scope.
- Characters are converted to bytes using UTF-8. Data that was encoded in an older character set, such as Latin-1, may decode into the wrong letters or fail.
- Spaces are always encoded as %20. The plus-for-space convention used by HTML form submissions is not applied when encoding or decoding.
- The tool does not check whether a URL is real, reachable, or safe. Treat unfamiliar links with caution even after decoding them, and never paste secrets into a link.
Key Terms
- Percent-encoding
- A way to write a character as a percent sign followed by two hexadecimal digits for each byte. It is also called URL encoding.
- Reserved character
- A character with a special meaning inside a URL, such as ? to start a query, & to separate parameters, = to assign a value, and # to start a fragment.
- Query string
- The part of a URL after the question mark that carries name and value pairs, such as q=shoes&page=2, separated by ampersands.
- UTF-8
- The standard way of turning characters into bytes. English letters take one byte, accented letters usually two, and emoji four.
- Double encoding
- Encoding text that was already encoded, so each percent sign becomes %25. The result decodes back only to the first layer of encoding, not to the original.
Frequently Asked Questions
What’s the difference between Component and Full URL?+
Component (encodeURIComponent) encodes everything including & ? / = — use it for a single query value or path segment. Full URL (encodeURI) leaves those structural characters alone so a complete URL still works.
Why do I get a decode error?+
Decoding fails when the text has an invalid percent sequence — for example a lone “%” or “%zz” that isn’t a valid hex byte. Fix or remove it and try again.
Is my text uploaded anywhere?+
No — all encoding and decoding happens locally in your browser. Nothing is sent to a server.
Why does a space become %20 instead of a plus sign?+
This tool always uses %20, the standard URI percent-encoding produced by JavaScript's encodeURIComponent/encodeURI. The + character for spaces is a different, older convention used only in HTML form submissions (application/x-www-form-urlencoded) — this tool doesn't do that kind of form encoding, so you'll never see a + in its output.
How does it handle accented letters or emoji?+
Correctly — because it's backed by the browser's native encodeURIComponent/encodeURI, a non-ASCII character is first broken into its UTF-8 bytes and each byte is percent-encoded separately. An accented letter like é becomes two groups (%C3%A9), and an emoji, which needs more UTF-8 bytes, can produce four.
What does it mean when I see %2520 in a link?+
It is double encoding. A space is first encoded as %20. If that already-encoded text is run through an encoder again, the percent sign becomes %25, turning %20 into %2520. Decode once to get back to %20, and decode again to reach the real space. If you see it in your own links, find where the extra encoding step is and remove it, since the receiving server will usually decode only once.
Why does the decoder leave a plus sign as a plus?+
In web addresses a plus is an ordinary character, and the browser decoding functions this tool relies on never turn it into a space. The plus-means-space rule belongs to HTML form submissions in application/x-www-form-urlencoded format. If you are decoding a link from a form submission, replace plus signs with spaces first, then decode the remaining percent sequences.
Why does Full URL decoding keep %26 and %2F encoded?+
Because decoding them would change what the address means. A %26 inside a value stands for a literal ampersand, but a raw ampersand would end the parameter. Likewise %2F is a slash inside a name, not a path separator. Full URL mode therefore keeps escapes for reserved characters. Use Component mode to decode a single value fully, if you are sure no structure will be lost.
Is URL encoding the same as encryption?+
No. Percent-encoding only changes how characters are written so a URL stays valid. It involves no key or secret, and anyone can reverse it instantly with a tool like this one. Do not rely on it to hide passwords, tokens, or personal details placed in a link, because web servers, browser histories, and proxy logs routinely record complete URLs.
How should I build a query string safely?+
Encode each parameter name and value separately in Component mode, then join them yourself with = between name and value, & between pairs, and a single ? before the first pair. For example, encode coffee & cream on its own and place it after q=. Encoding the finished string in one pass, in either mode, either breaks the separators or leaves unsafe characters in the values.
Found this useful? Share it
Help someone else out — or link to it from your own site.
Link to this tool
Writing about url encoder / decoder? Paste this on your site to link here.
<a href="https://everyfix.net/tools/url-encoder-decoder/">URL Encoder / Decoder</a> by <a href="https://everyfix.net">EveryFix</a>Related Tools
JSON Formatter
Format, validate, and minify JSON instantly in your browser.
Use tool →Case Converter
Convert text to UPPERCASE, lowercase, Title, camelCase, and more.
Use tool →Number Base Converter
Convert numbers between binary, octal, decimal, and hex.
Use tool →Age Calculator
Calculate your exact age in years, months, and days.
Use tool →