URL encode / decode

Percent-encode text for safe use in URLs, or decode percent-encoded strings back to readable text.

Ready.

How it works

Worked examples

Encode a query

Input: a b&c=d

Output: a%20b%26c%3Dd

Spaces, &, and = are percent-encoded so they are safe in a URL.

Encode a full URL

Input: https://rapidunits.com/?q=cm to inches

Output: https%3A%2F%2Frapidunits.com%2F%3Fq%3Dcm%20to%20inches

encodeURIComponent escapes every reserved character.

Decode

Input: a%20b%26c%3Dd

Output: a b&c=d

Percent-encoded text is decoded back to the original.

FAQ

What is the difference from encodeURI?

encodeURIComponent escapes more characters (including & ? = /), which is what you want for query values.

Why did decoding fail?

A lone % or an incomplete sequence like %2 is invalid; the tool flags it instead of guessing.

Does it handle Unicode?

Yes — characters are encoded as their UTF-8 bytes, so any language works.

Updated: June 7, 2026