Skip to content
devutils.info

Encoding Tools · Guide

URL Encoder / Decoder guide

Percent-encode and decode URL components, including Unicode characters.

Open the URL Encoder / Decoder

About the URL Encoder / Decoder

URLs may only contain a limited set of ASCII characters. Everything else — spaces, &, ?, #, non-English letters, emoji — must be percent-encoded as % followed by two hex digits per UTF-8 byte.

This tool encodes and decodes URL components using the same rules as JavaScript's encodeURIComponent and decodeURIComponent, with an option for whole-URL encoding (encodeURI).

How to use

  1. Choose Encode or Decode.
  2. Pick Component mode for a single query value or path segment, or Full URL mode to keep :/?#&= intact.
  3. When decoding form submissions, enable Treat + as space (application/x-www-form-urlencoded).
  4. Copy the result.

Examples

Encode a query value

Input

price < 100 & category=books

Output

price%20%3C%20100%20%26%20category%3Dbooks

Encode Unicode

Input

café ☕

Output

caf%C3%A9%20%E2%98%95

Encode a full URL

Full URL mode keeps reserved characters.

Input

https://example.com/search?q=hello world

Output

https://example.com/search?q=hello%20world

Component vs full URL encoding

encodeURIComponent escapes every reserved character (; , / ? : @ & = + $ #) so a value can't break the URL's structure — use it for individual parameters. encodeURI leaves those characters alone and is meant for an already-assembled URL. Encoding a whole URL in component mode turns https:// into https%3A%2F%2F.

Frequently asked questions

Why is a space encoded as %20 and not +?

%20 is the standard percent-encoding for a space in URLs. + means space only in HTML form encoding (application/x-www-form-urlencoded). Enable Treat + as space when decoding form data.

What does “Malformed escape” mean?

A % must be followed by exactly two hexadecimal digits. Input like 100% or %zz is not valid percent-encoding. Encode a literal percent sign as %25.

Why does decoding fail with a UTF-8 error?

Multi-byte characters are encoded as several %XX groups. If some of them are missing (e.g. %E2%98 without the final byte), the sequence isn't valid UTF-8.

Ready to try it? Everything runs locally in your browser.

Open the tool