Developer Tools

URL Encode / Decode — Free, No Upload, Instant

🔒 Runs in your browser

Encode or decode URL components using encodeURIComponent — the right choice for query parameter values. Runs in your browser: instant results, no upload, no server, no logs.

How to use this tool

  1. Paste the URL or text to encode.
  2. Switch between Encode and Decode mode.
  3. Copy the output.

About URL Encoder / Decoder

The URL Encode / Decode tool converts text to and from URL-encoded (percent-encoded) form so it can travel safely inside a URL. Switch between Encode and Decode mode, type or paste into the input, and the result appears live below with a one-click Copy button. It is the quick reference you reach for when a query parameter is breaking because it contains a space, an ampersand, or other reserved characters.

Encoding uses the browser's built-in encodeURIComponent. That function percent-encodes everything except the unreserved characters: letters, digits, and the small set - _ . ! ~ * ' ( ). Crucially, it does encode characters that have structural meaning in a URL, such as &, =, ?, #, /, and spaces (a space becomes %20). That is exactly what you want for an individual parameter value, because those characters would otherwise be interpreted as URL syntax rather than data. Decoding uses decodeURIComponent to reverse the process and turn percent sequences back into readable text.

Reach for this when you are constructing query strings by hand, debugging why an API call with special characters fails, building redirect or callback URLs, or reading an encoded value out of a log or browser address bar. The encode and decode modes are symmetric, so you can round-trip a value to confirm it survives intact.

Two things to keep in mind. Because the tool uses encodeURIComponent rather than encodeURI, it is meant for encoding a single component (one parameter value or path segment), not a whole URL. If you encode an entire URL with it, the :// and the ? and & separators get percent-encoded too, which is usually not what you want. On decode, a malformed input, such as a lone % or a truncated sequence like %2, cannot be parsed and the tool shows a clear error pointing at the bad percent sequence instead of returning garbage. All processing happens in your browser with no upload.

Frequently Asked Questions

When should I URL-encode text?
Whenever you put arbitrary text into a query parameter, a path segment, or any other URL position where it might contain reserved characters. Spaces, ampersands, equals signs, question marks, and hash symbols all have structural meaning in a URL and must be encoded so they are treated as data, not syntax.
What is the difference between encodeURIComponent and encodeURI?
This tool uses encodeURIComponent, which encodes everything except letters, digits, and the characters - _ . ! ~ * ' ( ). It deliberately encodes URL separators like & = ? # and /, making it the right choice for a single parameter value. encodeURI leaves those separators alone and is meant for an entire URL.
Why shouldn't I encode a whole URL with this?
Because encodeURIComponent treats the structural parts of a URL as data, encoding a full URL would percent-encode the :// and the ? and & separators, breaking it. Encode only the individual value you are inserting, such as one query parameter.
What happens if decoding fails?
If the input has a malformed percent sequence, such as a stray % or a truncated code like %2, decodeURIComponent cannot parse it. The tool catches the error and shows a message telling you to check for malformed percent sequences, rather than returning corrupted output.
Does a space become a plus sign or %20?
A space becomes %20. The plus sign is used for spaces only in the older application/x-www-form-urlencoded form encoding, not in the percent-encoding that encodeURIComponent produces for URL components.
Can I round-trip a value to verify it?
Yes. Encode a value, copy the result, switch to Decode, and paste it back. If you get your original text, the value survives encoding and decoding intact, which is a quick way to confirm a tricky parameter is handled correctly.
Is my input sent anywhere?
No. Encoding and decoding use built-in browser JavaScript and run entirely on your device, so nothing you paste is transmitted.
Embed this tool on your site

Free. One line of HTML — the tool runs in your visitor's browser, no data sent to anyone.

<iframe src="https://brevio.pro/embed/url-encode" width="100%" height="600" loading="lazy" style="border:1px solid #e5e5e5;border-radius:8px" title="URL Encoder / Decoder — brevio"></iframe>
<p style="font:12px/1.4 sans-serif"><a href="https://brevio.pro/tools/url-encode">URL Encoder / Decoder</a> by <a href="https://brevio.pro">brevio</a></p>
More free toolsSee all 492 →
URL Encode / Decode — Free, No Upload, Instant | brevio