URL Encoder / Decoder
Percent-encode text so spaces, ampersands, and other reserved characters travel safely inside a URL — and decode it right back. Everything happens locally in your browser.
How it works
URLs can only carry a limited set of characters. Anything outside that set — spaces, ampersands, question marks, non-ASCII letters — has to be percent-encoded, meaning each byte becomes a % followed by two hex digits. That's how a space turns into %20.
Encode mode runs encodeURIComponent, which escapes every reserved character so your value is safe to drop into a query string or path segment. Decode mode runs decodeURIComponent to reverse it. Both handle full UTF-8, so accented letters and emoji survive the round trip.
If you paste something that isn't valid percent-encoding — a stray % with no hex digits after it, for example — decoding can't complete, so the tool shows a warning instead of throwing an error.
Frequently asked questions
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent escapes almost everything, which is what you want for a single query value or path piece. encodeURI leaves characters like / and ? alone because it assumes you're encoding a whole URL. This tool uses encodeURIComponent for the strictest, most common case.
Why did decoding fail on my string?
decodeURIComponent expects every % to be followed by two valid hex digits. A lone % or a truncated sequence like %2 is malformed, so decoding stops and you'll see a warning rather than a broken result.
Does my text get sent anywhere?
Nothing leaves your machine. The encoding and decoding both run in JavaScript inside your browser, so you can safely paste private values.