OpenReplay Logo
12k

URL encoder/decoder

Percent-encode and decode URLs and query strings in your browser — encodeURIComponent or encodeURI, nothing leaves your machine.

Processed locally

About this tool

URL encoding (also called percent-encoding) replaces characters that have special meaning or aren't allowed in a URL with a percent sign followed by their hexadecimal byte value — a space becomes %20, an ampersand becomes %26, and so on. JavaScript exposes two flavors: encodeURIComponent escapes nearly everything including reserved delimiters like &, =, ?, and /, which makes it right for a single value such as a query-string parameter, while encodeURI leaves the structural characters of a full URL intact so the address stays usable.

Use it to safely drop a value into a query string, debug a link where special characters or Unicode got mangled, or read back what an encoded redirect or tracking URL actually contains. Switch to Decode to turn %20 and friends back into readable text, pick the Component or Full URL scope to match how the string was produced, and toggle "+ as space" when you're decoding form-style query strings where spaces were sent as plus signs.

encodeURIComponent escapes the reserved delimiters &, =, ?, and / while encodeURI leaves them intact — use Component for a single value and Full URL only for a complete address.

Frequently asked questions

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent escapes reserved URL characters like &, =, ?, and /, so it is meant for a single value such as one query-string parameter. encodeURI preserves those structural characters, so it is meant for encoding a complete URL without breaking it.

Why does + sometimes mean a space in a URL?

In application/x-www-form-urlencoded query strings (how HTML forms submit data), spaces are encoded as + rather than %20. Standard URL decoders do not convert + back to a space, so enable the "+ as space" option when decoding form-style query strings.

What does "Malformed percent-encoding" mean when decoding?

It means the input contains a % that is not followed by two valid hexadecimal digits, or an incomplete multi-byte sequence such as %E0%A4%A. The decoder cannot interpret those bytes, so it reports an error instead of returning partial, corrupted text.