# URL Encode & Decode

URL encoding (percent-encoding) replaces each unsafe character with a % and the two hex digits of its UTF-8 bytes, so a space becomes %20 and an emoji becomes four escapes. The example “Café menu: 50% off & שלום 😀” encodes to Caf%C3%A9%20menu%3A%2050%25%20off%20%26%20%D7%A9%D7%9C%D7%95%D7%9D%20%F0%9F%98%80 in Component mode. Pick Component for a single value such as a query parameter, Whole URL to keep a complete address intact, or Form for application/x-www-form-urlencoded, where a space is + (“hello world” becomes hello+world). Decoding reverses it, reports a broken sequence such as %ZZ by position instead of failing, and spots text that was encoded twice (%2520). Paste a full URL into the breakdown to see its parts: the example has 4 query parameters and 2 path segments. Nothing leaves your browser.

Canonical page: https://ponderloop.com/tools/url-encode-decode/
Updated: 2026-10-03

## How to use

How to URL encode or decode text

1. **Choose Encode or Decode**: Pick the direction, then paste or type your text. The result updates as you type.
2. **Pick the mode**: Component encodes a single value. Whole URL keeps : / ? # & = so a full address still works. Form is for form data, where a space is written as +.
3. **Check the messages**: A broken sequence such as %ZZ is listed with its position and kept as typed. If the text was encoded twice, press “Decode again”.
4. **Copy the result**: Use Copy to put the result on the clipboard. To inspect a whole link, paste it into the URL breakdown.

## Reference tables and worked examples

### Reserved and unsafe characters

What each mode produces for a single character. “kept” means the character is left as it is. Computed with the same code as the tool.

| Character | Name | Percent-encoded | Component | Whole URL | Form |
| --- | --- | --- | --- | --- | --- |
| (space) | Space | %20 | %20 | %20 | + |
| ! | Exclamation mark | %21 | kept | kept | %21 |
| " | Double quote | %22 | %22 | %22 | %22 |
| # | Hash (fragment start) | %23 | %23 | kept | %23 |
| $ | Dollar sign | %24 | %24 | kept | %24 |
| % | Percent sign | %25 | %25 | %25 | %25 |
| & | Ampersand | %26 | %26 | kept | %26 |
| ' | Apostrophe | %27 | kept | kept | %27 |
| ( | Opening parenthesis | %28 | kept | kept | %28 |
| ) | Closing parenthesis | %29 | kept | kept | %29 |
| * | Asterisk | %2A | kept | kept | kept |
| + | Plus | %2B | %2B | kept | %2B |
| , | Comma | %2C | %2C | kept | %2C |
| / | Slash | %2F | %2F | kept | %2F |
| : | Colon | %3A | %3A | kept | %3A |
| ; | Semicolon | %3B | %3B | kept | %3B |
| = | Equals sign | %3D | %3D | kept | %3D |
| ? | Question mark | %3F | %3F | kept | %3F |
| @ | At sign | %40 | %40 | kept | %40 |
| [ | Opening square bracket | %5B | %5B | %5B | %5B |
| ] | Closing square bracket | %5D | %5D | %5D | %5D |

### Non-ASCII characters are encoded as UTF-8 bytes

Every byte of the character’s UTF-8 form becomes one %XX escape, in all three modes.

| Character | Name | Code point | Percent-encoded |
| --- | --- | --- | --- |
| é | Latin small e with acute | U+00E9 | %C3%A9 |
| € | Euro sign | U+20AC | %E2%82%AC |
| א | Hebrew letter alef | U+05D0 | %D7%90 |
| 中 | Chinese character “middle” | U+4E2D | %E4%B8%AD |
| 😀 | Grinning face emoji | U+1F600 | %F0%9F%98%80 |

## How it works

Encoding calls the browser’s encodeURIComponent (Component mode) or encodeURI (Whole URL mode). Form mode starts from encodeURIComponent, writes a space as + and also encodes ! ' ( ) ~, which matches how URLSearchParams serializes. Unpaired surrogates, which cannot be written as UTF-8, are replaced by U+FFFD first. Decoding is a small parser of its own so errors can be located: each %XX becomes a byte, runs of bytes are decoded as strict UTF-8 (no overlong forms, surrogates or values above U+10FFFF), and anything invalid stays as typed and is listed with its character position. Whole URL decoding leaves the escapes for ; / ? : @ & = + $ # alone, like decodeURI; Form decoding also turns + into a space. The breakdown uses the standard URL parser and URLSearchParams, so it applies the same rules as the browser, including its default ports and punycode for international host names.

## FAQ

### What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes every character except letters, digits and - _ . ! ~ * ' ( ), so it is right for one piece of a URL such as a query value. encodeURI additionally keeps ; , / ? : @ & = + $ # because they give a URL its structure, so it is meant for a complete address. Using encodeURI on a value leaves & and = unescaped and breaks the query string.

### Should a space be %20 or +?

%20 is correct everywhere in a URL. + means a space only in application/x-www-form-urlencoded data, which is how HTML forms and URLSearchParams write a query string. In a URL path a + is a literal plus sign, so decode with Form mode only for form data and query strings.

### How are emoji and Hebrew or other non-English text encoded?

The text is converted to UTF-8 and each byte becomes a %XX escape. “é” is %C3%A9 (two bytes), “א” is %D7%90 and an emoji such as 😀 is %F0%9F%98%80 (four bytes). Decoding joins the bytes back into the same character.

### What does a malformed sequence like %ZZ or %E0%A4%A mean?

A % must be followed by two hex digits, and the bytes together must form valid UTF-8. “%ZZ” and a trailing “%A” are not escapes, and “%E0%A4” is the start of a three-byte character that was cut off. Browsers’ decodeURIComponent throws an error for these; this tool lists each one with its position, keeps it as typed, and decodes the rest.

### What is double encoding?

Encoding text that is already encoded turns each % into %25, so a space becomes %2520 instead of %20. One round of decoding then gives %20, not a space. When the tool sees %25 followed by two hex digits and the result still holds escapes, it offers “Decode again”.

### Is “already decoded” text safe to decode?

Yes. Characters that are not part of an escape pass through unchanged, so decoding plain text returns it as it was. A lone % in ordinary text (“100% sure”) is reported and kept.

### Why does encoding a whole URL change my % signs?

encodeURI, like every mode here, turns % into %25 because it cannot tell a literal percent from the start of an escape. If your URL is already encoded, decode it first or leave it as it is, otherwise it ends up double-encoded.

### How does the URL breakdown work?

It passes your text to the browser’s URL parser, which needs an absolute URL (a scheme such as https: first). Protocol, host, port, path segments, the query parameters in their original order (repeated keys included) and the fragment are shown decoded. A relative link such as /path?x=1 is explained instead of guessed at.

### Is my text sent anywhere?

No. Encoding, decoding and the breakdown run in your browser and nothing is uploaded or stored; reload the page and it is gone. The only thing the site records, if you allow analytics, is that a button was used, never any of the text.

## Sources

- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax, section 2.1 Percent-Encoding](https://www.rfc-editor.org/rfc/rfc3986#section-2.1)
- [WHATWG URL Standard (URL parser and application/x-www-form-urlencoded)](https://url.spec.whatwg.org/)
- [MDN: encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
- [MDN: encodeURI()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI)
- [RFC 3629: UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629)

---

Cite as: URL Encode & Decode, ponderloop, https://ponderloop.com/tools/url-encode-decode/, updated 2026-10-03
