Skip to content

Developer · Tools

URL Encoder / Decoder

Encode and decode URL components and query strings safely.

Encode

Decode

Runs locally in your browser. Your input is not uploaded or stored. You can verify this in your browser’s network panel.

What does this tool solve?

Percent-encoding makes text safe for URLs by escaping reserved characters as %XX byte values. Encode a value before placing it in a query string; decode a value you received to read it.

Continue with Base64 Encoder / Decoder, HTML Entity Encoder / Decoder · Base64, Base64URL, and Data URIs

What examples should you start with?

Encode a query value

Input
Text
a b&c=d?
Output
URI
a%20b%26c%3Dd%3F

Decode a query value

Input
URI
a%20b%26c
Output
Text
a b&c

Encode unicode

Input
Text
中文
Output
URI
%E4%B8%AD%E6%96%87

How does it work?

Encoding follows encodeURIComponent semantics: unreserved characters (A-Z a-z 0-9 - _ . ! ~ * ' ( )) pass through, everything else becomes UTF-8 bytes written as %XX hex pairs.

Decoding reverses the process and validates that every % is followed by two hex digits and that the resulting bytes form valid UTF-8.

What are the edge cases and limits?

  • This tool encodes a single component, not a whole URL — encoding an entire URL would escape its structural characters (: / ? #).
  • A stray or truncated % (like 100% or %2) is malformed input and reported as an error.
  • The application/x-www-form-urlencoded convention encodes spaces as +; this tool uses %20, which is also valid in query strings.

Technical reference

Related tools

Related guides