← All tools
// Encoding

URL Encoder / Decoder online

Encode or decode URL percent-encoded strings — handles Unicode

URL Encoder / Decoder logo
by
CHUNKY
MUNSTER
// Output
Output will appear here...

How to Use url-encode-decode

  1. Paste a URL or URL component into the input.
  2. Click Encode to percent-encode special characters.
  3. Click Decode to convert percent-encoded sequences (%20, %3D, etc.) back to characters.
  4. Use the component toggle to encode a query-parameter value versus a full URL.

URLs may only contain a safe set of ASCII characters. Any character outside this set — spaces, Unicode, reserved characters like &, =, and # — must be percent-encoded: each byte of the character's UTF-8 representation is replaced by a % followed by two hex digits. This tool encodes and decodes URL components and full URLs, with options for both encodeURIComponent (component) and encodeURI (full URL) semantics.

encodeURIComponent vs encodeURI

encodeURI encodes a full URL — it leaves the URL structure characters intact (:, /, ?, #, &) and encodes only characters that are unsafe in any URL position. encodeURIComponent encodes everything except unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) — designed for encoding individual query parameter keys and values before assembling a URL. Using the wrong one is a common source of broken links and API call failures.

Frequently Asked Questions

What is the difference between %20 and + for spaces in URLs?

%20 is the standard percent-encoding of a space character. The + convention is specific to application/x-www-form-urlencoded (HTML form POST bodies and query strings) where + is interpreted as a space. In path segments, + is a literal plus sign, not a space.

Which characters are safe without encoding in a URL?

Unreserved characters that never need encoding: A–Z, a–z, 0–9, -, _, ., ~. All other characters must be percent-encoded when used in positions where they are not their "reserved" structural role.

How are Unicode characters (emoji, Chinese) encoded in URLs?

Unicode characters are first converted to their UTF-8 byte sequence, and then each byte is percent-encoded. The emoji 😀 is U+1F600 → UTF-8 bytes F0 9F 98 80 → URL: %F0%9F%98%80.

What is IDN (Internationalised Domain Name) encoding?

Domain names are encoded using Punycode (RFC 3492) — not percent-encoding. The domain 例子.com becomes xn--fsqs375a.com in Punycode. URL path and query parameters use percent-encoding; domain names use Punycode.

See also the URL Parser, URL Extractor, and the HTML Encoder.