URL Encoder / Decoder

Free online URL encoder and decoder. Choose encodeURIComponent or whole-URL encodeURI, optionally use + for spaces, handles UTF-8 multibyte chars correctly. Runs in your browser.

Runs locally · data never uploaded
Advertisement

How to use

What it does

URL encoding (percent-encoding) turns characters that are not allowed in a URL into %XX sequences. It is used to build query strings, form bodies and API requests safely. This tool offers two levels:

  • Component (encodeURIComponent): encodes everything except A-Za-z0-9 - _ . ! ~ * ' ( ). Use it for a single parameter value.
  • Whole URL (encodeURI): keeps URL structural characters like ;/?:@&=+$,#. Use it for an entire URL.

Enable "Use + for spaces" to render spaces as + instead of %20 (the application/x-www-form-urlencoded style); decoding then turns + back into a space. Multibyte characters such as Chinese text or emoji are encoded as UTF-8 correctly.

Example

Component-encoding the value 你好 world:

%E4%BD%A0%E5%A5%BD%20world

With "Use + for spaces" enabled it becomes:

%E4%BD%A0%E5%A5%BD+world

Common uses

  • Safely appending Chinese parameters in the address bar or fetch() calls
  • Inspecting the before/after difference while debugging APIs
  • Handling special characters in form submissions and redirects

FAQ

Q1.What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes almost every non-alphanumeric character and is meant for a single value. encodeURI preserves separators like ; / ? : @ & = + $ , # and is meant for a whole URL. Using encodeURIComponent on a full link would encode the slashes and question mark, breaking it.
Q2.Why does Chinese text become such a long %E4%BD%A0 sequence?
Chinese characters take several bytes in UTF-8, and each byte is encoded as a %XX pair. This is standard and reversible — the other side decodes it back with the matching decoder.
Q3.Are + and %20 the same?
In application/x-www-form-urlencoded form data, + means a space; but in a normal URL path, + is just a plus. This tool has a "Use + for spaces" switch so encoding maps %20 to + and decoding maps + back to space, avoiding confusion.
Q4.Is my data uploaded?
No. All encoding and decoding happens locally in your browser; the page keeps working offline after a refresh.
Advertisement

Related tools