URL Encode & Decode
Percent-encode a query value, path segment, or whole URI — and decode it back. Optional form-style + for spaces. Everything stays in your browser.
Tool input stays in your browserDid you know · Security
Tony Hoare called the null reference his billion-dollar mistake; he introduced it in ALGOL W in 1965.
Plain text
you edit—Encoded
read only—Two encodings people mix up
JavaScript exposes two functions that look interchangeable and are not. Component uses encodeURIComponent: it encodes reserved characters such as &, =, and /. That is what you want for a query value or a single path segment. Full URI uses encodeURIand leaves those characters alone, so a complete https://… URL stays structurally valid while non-ASCII and spaces are still escaped.
Decode uses the matching decodeURIComponent or decodeURI. A broken percent sequence such as %E0%A4 (truncated UTF-8) is reported instead of throwing in the console.
Space as +
HTML forms historically encode spaces as + under application/x-www-form-urlencoded. Percent-encoding uses %20. Turn on Space as + to emit plus signs on encode and to treat plus as a space on decode. A literal plus in the source still becomes %2B first, so it is not collapsed into a space.
Why it is private
Encoding and decoding run as JavaScript inside this page. Open DevTools, switch to the Network tab, and paste a query string: no request carries the value. That matters when the value is a session token, a signed URL, or a customer identifier.
URL encode FAQ
URL encode, URL decode, percent-encoding, encodeURIComponent vs encodeURI, and space as +.
What is URL encode?
URL encode (percent-encoding) replaces reserved or non-ASCII characters with %HH sequences so a value is safe in a query string or path. This URL encoder maps to encodeURIComponent (component) or encodeURI (full URI). Optional space-as-+ matches HTML form encoding.
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes characters such as &, =, and /, which is what you want for a single query value or path segment. encodeURI leaves those reserved characters so a complete https:// URL stays structurally valid. This page exposes both as Component and Full URI.
How do I URL decode a string?
Paste the percent-encoded text, choose Decode, and pick the same variant used to encode it. If Space as + is on, plus signs become spaces. Invalid sequences such as truncated UTF-8 are reported instead of throwing in the console.
When should I encode space as +?
HTML forms historically use + for spaces under application/x-www-form-urlencoded. Percent-encoding uses %20. Turn on Space as + only when the target is form-style. A literal plus in the source is encoded as %2B first so it is not turned into a space.
Is this URL encoder private?
Yes. Encoding and decoding run in this tab. Tokens in query strings are not uploaded.