URL Encoder and Decoder

URL Encoder and Decoder

A URL encoder and decoder that percent encodes text and links in UTF-8, entirely in your browser.

0input characters
0output characters
0percent encoded sequences
0UTF-8 bytes in plain text

Everything runs in your browser with encodeURIComponent and encodeURI. Nothing you type is uploaded or stored.

This url encoder and decoder converts text, query strings and complete links into safe percent encoded form and back again, for developers, marketers building tracking links and anyone fixing a broken URL. It uses the browser's built in encodeURIComponent function with UTF-8, so accented letters, currency symbols and emoji are handled correctly, and nothing leaves your device.

Quick answer: A url encoder replaces each character that is not allowed in a URL with a percent sign and two hexadecimal digits for each UTF-8 byte. A space becomes %20, an ampersand becomes %26 and é becomes %C3%A9. Decoding reverses this, turning %20 back into a space.

URL encoder and decoder showing UTF-8 text percent encoded with character and byte counts
How the URL Encoder and Decoder works: text or URL in, safe percent encoded string out.

What Is URL Encoding?

URL encoding, also called percent encoding, is the way a URL represents characters that are reserved, unsafe or outside basic ASCII. Each such character is turned into its UTF-8 bytes, and each byte is written as % followed by two hex digits.

Reserved characters such as ? & = / and # have special jobs in a link, so they must be encoded when they appear inside a value. Unreserved characters, the letters A to Z and a to z, digits 0 to 9 and the four symbols - . _ ~, never need encoding. Everything else, including spaces and non ASCII letters, is encoded as bytes, which is why £ takes two sequences and € takes three.

How to Use the URL Encoder and Decoder

Step 1: Choose Mode and Scope

Pick Encode or Decode. Choose Component for a single value such as a search term or file name, or Full URL when you have a complete link and want to keep its slashes, question mark and ampersands working.

Step 1: choose encode or decode and component or full URL

Step 2: Set the Options

Tick spaces as + for data sent by an HTML form, which uses + instead of %20. Tick strict RFC 3986 if a server or signature scheme, such as OAuth, also needs ! ' ( ) and * encoded.

Step 2: choose plus signs for spaces or strict RFC 3986 encoding

Step 3: Paste Your Text

Type or paste the text or link. The result updates on every keystroke, and if the input contains a query string, a table lists each parameter with its decoded value so you can check tracking links at a glance.

Step 3: type or paste the text or URL

Step 4: Copy or Reverse

Press Copy result to copy the output, or Swap and reverse to feed it back in and check it decodes to your original. When you need binary safe text rather than URL safe text, the Base64 encoder and decoder is the right tool, and Clear empties the box for the next job.

Step 4: copy the encoded or decoded result

Which Characters Need URL Encoding?

Any character outside the unreserved set needs URL encoding when it appears inside a value, including spaces, reserved symbols and all non ASCII text. The table shows the most common ones.

CharacterEncodedWhy it matters
Space%20 (or + in forms)Not allowed in URLs
&%26Separates query parameters
=%3DSeparates a name from its value
?%3FStarts the query string
#%23Starts the fragment
/%2FSeparates path segments
+%2BRead as a space by form decoders
%%25Starts every encoded sequence
£%C2%A3Two UTF-8 bytes
€%E2%82%ACThree UTF-8 bytes
😀%F0%9F%98%80Four UTF-8 bytes

What Is the Difference Between encodeURI and encodeURIComponent?

encodeURIComponent encodes every reserved character, so use it for one value, while encodeURI leaves : / ? & = and # alone, so use it for a whole link. Using the wrong one is the most common percent encoding bug.

Worked example: Sam builds a search link for the phrase fish & chips £5. Encoding it as a component gives fish%20%26%20chips%20%C2%A35, so the full link becomes /search?q=fish%20%26%20chips%20%C2%A35 and the server receives the whole phrase. If Sam runs the full link through encodeURI instead, the & stays raw, the server sees a second parameter named " chips £5", and the search term is cut to "fish ".

Why Does My URL Show %2520?

Seeing %2520 means the text was encoded twice: the first pass turned a space into %20, and the second encoded the % sign itself as %25. Decode once with the url decoder, check the result, and encode only once at the point where the value enters the URL.

The same mistake breaks UTM tracking links and redirects. The slug generator avoids the problem for page addresses by producing plain lowercase words, while the MDN percent encoding reference lists the reserved set in full for developers who need it. Figures checked October 2026.

Key URL Encoding Terms Explained

These standards and terms explain how a url encoder decides which characters to change and why one character can become several percent sequences.

Percent encoding
The method URLs use to carry characters that are reserved or not allowed, writing each byte as a percent sign and two hexadecimal digits. A space becomes %20 and an ampersand becomes %26.
Reserved characters
Symbols with a structural job in a URL, such as the question mark that starts a query, the ampersand between parameters and the hash that starts a fragment. Inside a value they must be encoded.
Unreserved characters
The letters A to Z in both cases, the digits 0 to 9 and four symbols: hyphen, full stop, underscore and tilde. They are always safe in a URL and are never percent encoded.
UTF 8
The character encoding the web uses to store text as bytes. Plain English letters take one byte, the pound sign takes two, the euro sign three and most emoji four, and each byte becomes one percent sequence.
Query string
The part of a URL after the question mark, made of name and value pairs joined by ampersands. Values must be component encoded, otherwise an ampersand inside a value splits it into a new parameter.
</>Embed this calculator on your website

Add the free URL Encoder and Decoder to your own site or blog. Copy the code below and paste it into an HTML block. It resizes itself and works on phones.

How we checked this tool: Zahid Awais built this tool, checked it against the official rules or published standards where they apply, and tested it against worked examples. Results are estimates for planning, not personal financial or tax advice. Read our editorial policy and disclaimer, or report an error.

Frequently Asked Questions

Is %20 or + correct for a space?

Both are valid in different places. %20 is correct anywhere in a URL, while + means a space only in query strings sent by HTML forms. When unsure, use %20, because a + in a path is read as a literal plus sign.

Is URL encoding the same as encryption?

No. URL encoding only changes how characters are written so they travel safely in a link, and anyone can decode it instantly. It gives no privacy or security, so never use it to hide passwords or personal data.

Why does é become %C3%A9?

Percent encoding works on bytes, and é is stored as two bytes in UTF-8, C3 and A9. Each byte gets its own percent sequence, so one accented letter becomes six characters in the encoded URL.

What does a malformed URI error mean?

It means the text contains a % that is not followed by two hex digits, or a broken multi byte sequence. Look for a stray percent sign, such as 50% off, and encode it as %25 before decoding.

Do I need to encode letters and numbers?

No. Letters A to Z in either case, digits 0 to 9 and the four characters hyphen, full stop, underscore and tilde are unreserved and are never encoded by a correct URL encoder.

Is my text sent to a server?

No. This URL encoder and decoder runs entirely in your browser using JavaScript functions built into every modern browser. Nothing is uploaded, logged or stored, so it is safe for internal links and test data.