ToolJutsu
All tools
Developer Tools

URL Encoder & Decoder

Encode and decode URL-safe text.

Direction
Scope

Component escapes every reserved character — use it for a single query value or path segment.

0 chars
0 chars
Processed on your device. We never see your files.

How to use URL Encoder & Decoder

What this tool does

URLs may only contain a limited set of characters. Anything outside that set — spaces, accented letters, emoji, or symbols that have a special meaning in a URL — must be percent-encoded, replaced by a % followed by two hexadecimal digits. This tool does that conversion in both directions. Encode turns ordinary text into a percent-encoded string. Decode turns a percent-encoded string back into readable text. It uses the browser’s own native encoding functions, so the result matches exactly what your code and your server will produce, and every conversion runs locally without sending anything anywhere.

Why you might need it

Any time text travels inside a URL it has to be safe for that context. A search term with spaces, a redirect target passed as a query parameter, an email address in a link, a file path with non-Latin characters — all of these need encoding before they can be placed in a URL without breaking it. Going the other way, decoding is how you make sense of a URL you have been handed: a log line full of %20 and %3D, a tracking link, or a query string copied from the address bar. Encoding also prevents a subtle class of bugs and security issues, where an unescaped & or # inside a value silently splits the URL and changes its meaning. Getting the encoding right keeps the structure of the URL under your control.

How to use it

  1. Pick Encode or Decode with the Direction toggle.
  2. Choose a Scope: Component for a single value, or Full URL for a whole address. The one-line hint under the controls explains the difference.
  3. Type or paste your text into the input box on the left.
  4. The result appears in the output box on the right, updating as you type.
  5. Use Copy output to grab the result, or Clear to start fresh.

On a wide screen the input and output sit side by side; on a phone they stack. The character counters above each box show how the length changes — encoding almost always makes text longer, since one reserved character can become three characters or more.

Common pitfalls

The most important choice is Component versus Full URL, and getting it wrong is the most common mistake. Component mode (encodeURIComponent) escapes the structural characters : / ? & # = because inside a single value they are just data. Full URL mode (encodeURI) deliberately leaves those characters alone because they hold the URL together. If you encode an entire URL with Component mode you will destroy its structure; if you encode one query value with Full URL mode, an & inside it will leak out and split your parameters.

Decoding has its own trap: a malformed escape. A lone %, or % followed by something that is not two hex digits, is invalid and will throw an error rather than decode. This tool catches that and tells you, so you can find and fix the broken escape.

One more difference to know: percent-encoding turns a space into %20, but the older form-encoding format used by HTML forms turns a space into +. They are not interchangeable — decoding + as a literal plus is correct here.

Tips and advanced use

When building a URL by hand, encode each query value separately in Component mode and only then join them with & and =. That guarantees the separators stay separators. To clean up a messy logged URL, decode it in Full URL mode to read it, then decode individual parameters in Component mode if a value itself contains encoded characters — double-encoding is real and sometimes you must decode twice.

Because everything runs in your browser, it is safe to encode or decode URLs that contain tokens, internal identifiers, or personal data; none of it is transmitted. The tool also keeps working offline once the page has loaded.

Frequently asked questions

Is anything I paste sent to a server?
No. URL encoding and decoding both run entirely in your browser using JavaScript's built-in functions. Nothing you type or paste is uploaded anywhere, which you can verify in your browser's Network tab.
What is the difference between Component and Full URL mode?
Component mode escapes every reserved character, so it is right for a single query value or path segment. Full URL mode leaves URL-structural characters like colon, slash, question mark, ampersand, and hash intact, so it is right for encoding an entire URL at once.
Why does decoding fail with an error?
Decoding throws when the input contains a malformed percent-escape — for example a lone percent sign, or a percent followed by characters that are not valid hexadecimal. Fix or remove the broken escape and the decode will succeed.
Does this tool handle spaces and emoji correctly?
Yes. Spaces become %20 and non-ASCII characters such as accented letters and emoji are encoded as UTF-8 percent-escapes. Decoding reverses this exactly, so text round-trips without loss.
Should I use this for form data with plus signs for spaces?
This tool follows the percent-encoding standard, where a space becomes %20. The older application/x-www-form-urlencoded format encodes a space as a plus sign instead; if you need that variant, replace %20 with a plus after encoding.

Related tools