URL Encoder/Decoder

Encode URLs and query strings or decode percent-encoded ones. Full Unicode support including emojis and non-Latin scripts. Browser-based, no upload.

infoHow It Works

Encoding

Characters that are not unreserved (A-Z, a-z, 0-9, -, _, ., ~) are replaced with percent-encoded sequences like %20 for a space.

Decoding

Percent-encoded sequences (%XX) are converted back to their original characters. Invalid sequences will trigger an error.

Unicode

Non-ASCII characters are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, a two-byte character becomes two %XX sequences.

table_chartCommon Encodings

Space%20
!%21
#%23
$%24
&%26
+%2B
/%2F
=%3D
?%3F
@%40

lightbulbTip

Use encodeURIComponent for individual query parameter values. Use encodeURI only when encoding a full URL where you want to preserve :, /, and ? characters.

What is the URL Encoder/Decoder?

URL encoding (percent-encoding) replaces characters that have special meaning in a URL with % followed by their hex value. A space becomes %20, an & becomes %26. It's required any time you put user input, an emoji, or a non-Latin character into a URL parameter, since the alternative is a broken request or a security hole.

How to use the URL Encoder/Decoder

  1. 1

    Paste your URL or text

    Drop a raw URL or string into the left pane to encode, or a percent-encoded string into the right pane to decode.

  2. 2

    Click Encode or Decode

    The encoder calls encodeURIComponent, which is the right choice for individual query parameter values. Decoder is the inverse.

  3. 3

    Spot-check the result

    Look for %20 (space), %2F (slash), %3D (equals), %26 (ampersand). If those appear where you expect them, the encoding worked.

  4. 4

    Copy and paste into your URL

    Tap the copy icon. The encoded value is safe to drop into any HTTP request, redirect, or affiliate link.

Frequently Asked Questions

What is URL encoding?

URL encoding replaces characters that aren't safe in a URL with % followed by their hex byte value. A space becomes %20, an ampersand becomes %26. It's how you safely put user input, emojis, or non-Latin characters into a query string without breaking the URL parser on the other end.

What's the difference between encodeURI and encodeURIComponent?

encodeURI is for whole URLs and leaves reserved characters (:, /, ?, #, &) alone. encodeURIComponent is for individual values inside a URL and escapes everything that isn't a letter, digit, or one of -_.~. This tool uses encodeURIComponent, which is what you want 90% of the time.

Does it handle Unicode characters?

Non-ASCII characters are first converted to their UTF-8 byte sequence, then each byte is percent-encoded. So a single emoji becomes 4 hex pairs, and a Cyrillic letter becomes 2. Decoding reverses the same way.

Related Tools