PTBox

URL Encode / Decode Online

URL percent-encoding tool for query parameters and path segments. Runs locally in your browser.

Usage

Percent-encode and decode URL components when you need to embed special characters (non-ASCII, spaces, &, ?, etc.) into query strings or path segments.

Wraps encodeURIComponent / decodeURIComponent.

Use cases

Query parameters with CJK or spaces

Encode values like ?name=张三 before embedding them in a URL.

OAuth callback URLs

When a redirect target URL is itself a query parameter, it must be encoded as a single value.

API paths with special chars

Path segments containing / ? & = need encoding if they're meant as data.

Reading encoded URLs

Decode %E4%B8%AD%E6%96%87 back into 中文 to see what the URL actually carries.

FAQ

encodeURI vs encodeURIComponent?

encodeURI preserves :/?&=#, suitable for a whole URL. encodeURIComponent encodes everything, suitable for a single value. This tool uses the latter.

What happens with double encoding?

%20 encoded again becomes %2520. Avoid double encoding or the other side won't recover the original value.

Is + the same as space?

In application/x-www-form-urlencoded yes. In raw URL specs technically no — be careful in query strings.

Why does Chinese expand into many %xx?

Each CJK character is 3 bytes in UTF-8, encoded as 3 percent-escapes. This is standard behaviour.

Related tools

Comments

0 / 1000