URL Encoder / Decoder

Percent-encode and decode URLs and URL parameters, with both encodeURIComponent and encodeURI modes.

Resulthttps%3A%2F%2Fexample.com%2Fsearch%3Fq%3D%E4%BD%A0%E5%A5%BD%2C%20world%26lang%3Dzh

What is it

Spaces, Chinese characters and symbols cannot travel safely inside a URL, so they get replaced by a percent sign plus hex bytes: a space becomes %20, 中 becomes %E4%B8%AD. There are two flavors: encodeURIComponent encodes everything that has a special meaning (good for query parameter values), while encodeURI keeps URL structure intact and only encodes really illegal characters (good for a full URL). This tool gives you both.

Notes & fun facts

Ever pasted a WeChat link and ended up with a monster like https://example.com/?from=%E5%88%86%E4%BA%AB? That is percent encoding doing its job. The classic gotcha: people use encodeURIComponent where they needed encodeURI and accidentally escape the slashes, or the other way around and break a parameter value containing an ampersand. This tool shows both side by side so you can spot which one you meant.

Origin & history

Percent-encoding was invented by Tim Berners-Lee and the early URI working group around 1994, when URLs were first defined in RFC 1738. The rules were later refined by RFC 2396 (1998) and RFC 3986 (2005), which is the document browsers still follow today.

Keep a kind heart, hold integrity as your foundation, and cherish warm love; may the world know peace and humanity live in harmony.
持善良之心,守正直之本,怀温暖之爱;愿世界和平,人间祥和。