Tool 005 / dev / free / runs locally
URL Encoder and Decoder
Encode text into a percent-encoded URL component or decode an encoded string back to plain text. Useful for query parameters, redirect URLs, and API debugging. All processing happens locally in your browser.
https%3A%2F%2Ftoolsnimbus.com%2F%3Fq%3Dhello%20world
How it works
This tool percent-encodes and decodes text using the browser's built-in encodeURIComponent and decodeURIComponent functions. Percent-encoding replaces characters that are unsafe or reserved in a URL (spaces, ampersands, question marks, slashes, non-ASCII letters) with a percent sign followed by their byte value in hexadecimal, so the value survives being placed in a query string or path segment.
It uses the component variant on purpose. encodeURIComponent escapes reserved delimiters like &, =, ?, and / as well, which is exactly what you want when encoding a single query-string value. The full-URL variant would leave those delimiters alone and corrupt your parameters. Decode reverses the process and reports a clear error if the input contains a malformed percent sequence.
Everything happens locally in your browser. Encoding is UTF-8 aware, so a character like é becomes %C3%A9 (its two UTF-8 bytes) rather than a single mangled byte.
How to use it
- Pick Encode to make text URL-safe, or Decode to turn percent-codes back into text.
- Paste the value into the input box.
- Read the converted result on the right.
- Copy it into your URL, query string, or wherever you need it.
Worked examples
Input: Encode: https://toolsnimbus.com/?q=hello world
Output: https%3A%2F%2Ftoolsnimbus.com%2F%3Fq%3Dhello%20world
Note that : / ? = are all escaped because this is the component encoder.
Input: Decode: caf%C3%A9%20au%20lait
Output: café au lait
Two-byte UTF-8 sequences decode back to the accented character.
Edge cases and limits
- This is the component encoder. If you paste a whole URL to encode, its slashes and colons get escaped too, which is correct for a single value but not for a ready-to-use link.
- Decoding a string with a half-finished escape such as %E0% throws a malformed-encoding error rather than guessing.
- A literal plus sign is not treated as a space. Some older form encoders use + for space; this tool follows the percent-encoding standard, where space is %20.
Common mistakes
- Encoding an entire URL when you only meant to encode one parameter value, then wondering why the link no longer works.
- Double-encoding: running already-encoded text through Encode again turns %20 into %2520. Decode once per layer of encoding.
- Assuming + means space on decode. Replace + with a space yourself first if the source used form encoding.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?+
encodeURIComponent escapes more characters, including ampersands and slashes, which makes it the right choice for individual query parameter values. This tool uses component-style encoding by default.
Why does a plus sign sometimes appear instead of a space?+
Percent encoding turns a space into %20. The plus sign for a space is a separate convention from HTML form submissions. If you need that style, replace %20 with a plus after encoding.
Is my input sent to a server?+
No. Encoding and decoding use built-in browser functions and run entirely on your device. Nothing you type is uploaded or stored.
Related tools
More Developer tools that run entirely in your browser.