← Free tools

URL encoder / decoder

Encode text for safe use in a URL, or decode a URL-encoded string back to plain text. Runs entirely in your browser - nothing is sent anywhere.

Output

URL (percent) encoding replaces characters that aren't safe in a URL - spaces, &, ?, #, and non-ASCII characters - with a % followed by their hex code, so the value can be passed as a query parameter or path segment without breaking the URL. "Component" mode encodes everything meant for a single query string value or path segment (spaces, &, /, ? all get encoded). "Full URL" mode leaves URL structure characters (:, /, ?, &, #) alone and only encodes the rest, which is what you want when encoding a whole URL rather than one piece of it.

Everything happens locally in your browser. Nothing you paste here is sent to a server, logged, or stored.

Frequently asked questions

What's the difference between Component and Full URL mode?

Component mode (encodeURIComponent) encodes every character that isn't safe in a single value, including /, ?, &, and #. Full URL mode (encodeURI) assumes you're encoding an entire URL and leaves those structural characters alone, only encoding things like spaces and non-ASCII characters.

Why did decoding fail on my input?

Decoding fails if the input contains a % that isn't followed by two valid hex digits, which means it isn't a properly URL-encoded string.

Does this support Unicode text?

Yes. Encoding and decoding both handle Unicode text (emoji, accented characters, non-Latin scripts), not just plain ASCII.