URL Encoder and Decoder for Query String Values
Encode or decode URLs and URI components instantly
What is URL encoding?
URLs can only carry a limited set of characters. Everything else — spaces, &, ?, =, #, /, non-ASCII text — must be percent-encoded: each byte becomes % followed by two hex digits, so a space becomes %20 and é becomes %C3%A9. Without it, a & inside a query value splits the parameter in two and a # silently truncates everything after it.
This tool wraps JavaScript's encodeURIComponent and decodeURIComponent — the strict component-level functions that encode every reserved character, which is what you want for a single query-string value or path segment. Both directions run entirely in your browser; nothing you paste is uploaded or logged.
When to use it
Encode when you're building a URL by hand and a value contains reserved characters: a redirect_uri for an OAuth flow, a search query with spaces and ampersands, a callback URL nested inside another URL. Decode when you're doing the reverse — reading a %-riddled query string out of an access log, a Referer header, or a tracking link and trying to see the actual values.
Decoding is also the fast way to unwrap layered redirects: marketing and SSO links often encode a URL inside a URL inside a URL, and each pass through the decoder peels off one layer. Once you have a result worth discussing, the "Copy link to this result" button gives you a permalink that restores the exact input and mode for whoever opens it.
Example
Say you need to pass https://app.example.com/callback?next=/dashboard as a redirect_uri parameter. Paste it in encode mode and you get https%3A%2F%2Fapp.example.com%2Fcallback%3Fnext%3D%2Fdashboard — safe to drop into another URL because the ?, = and / can no longer be misread as structure of the outer URL. Paste that blob back in decode mode and the original returns, confirming nothing was mangled.
How to use the URL Encoder and Decoder for Query String Values tool
- 1
Choose Encode or Decode
Encode makes a value safe to embed in a URL; Decode turns %XX sequences back into readable text.
- 2
Paste your text
A full URL, a single query value, or a percent-encoded blob from a log.
- 3
Hit Convert
The result appears in the output panel; errors (like a stray %) are shown below.
- 4
Copy or share
Copy the output, or copy a permalink that restores your exact input and mode.
Frequently asked questions
Why does decoding throw 'URI malformed'?
The input contains a % that isn't followed by two valid hex digits — usually a literal percent sign that was never encoded, or a string that was truncated mid-sequence. Find the bare % and either remove it or complete the escape (a literal percent should be %25).
Should I encode a whole URL or just the value?
Just the value. This tool uses encodeURIComponent, which encodes reserved characters like :, / and ? — correct for a single parameter value or path segment, but it will break a full URL's structure if you feed one in. Encode each dynamic piece, then assemble the URL.
Why did my + turn into a plus sign instead of a space?
Encoding spaces as + is a legacy convention specific to application/x-www-form-urlencoded form bodies. Standard percent-encoding uses %20, and this tool follows the standard — decodeURIComponent leaves + alone by design. Replace + with %20 before decoding old-style form data.
Is anything I paste sent to a server?
No. Both directions run entirely in your browser. That includes the shareable permalink: your input lives in the URL fragment, which browsers never transmit to any server.
Related on TechLogHub
Related Encoding Tools
Get the next tool before you need it
One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

