Skip to content

URL Encoder & Decoder

Encode text so it is safe in a URL, or decode percent-encoded text. Uses the same rules as encodeURIComponent. Runs in your browser.

http URL Encoder & Decoder
verified RFC 3986 Standard • Real-time character conversion active
0 Chars • Encode Mode
URL / Plain String Input
Standard percent-encoding (%20, %2F, etc.) 82 chars
Converted Output
Instant browser-side transformation 0 chars

What this tool does

Choose Encode to turn text into percent-encoding, for example a space becoming %20 and & becoming %26. Choose Decode to turn it back. The conversion happens as you work, in your browser.

How to use it

  1. Choose Encode URL or Decode URL.
  2. Paste only the value you want to convert, not the whole address, when you are encoding.
  3. Press Copy Output to take the result.

Which rules it uses

Encoding uses JavaScript’s encodeURIComponent. That is the right choice for a single value, such as a query-string parameter or a path segment. It encodes everything except letters, digits and - _ . ! ~ * ' ( ).

That has a consequence worth knowing: if you paste a whole URL, the colons and slashes are encoded too, and you get something like https%3A%2F%2Fexample.com. That is correct for putting a URL inside another URL’s parameter, but not what you want if you just wanted to clean up a link. Encode only the part that is a value.

Decoding treats + as a space before decoding the percent sequences, which is how HTML forms encode spaces in query strings.

Common problems

  • Double encoding. If you see %2520, the text was encoded twice. Decode once and check.
  • Malformed sequences. A stray % that isn’t followed by two hex digits makes decoding fail with an error.
  • Non-ASCII text is encoded as UTF-8 bytes, so é becomes %C3%A9.
  • Reserved characters in paths. A / inside a value must be encoded as %2F, or it will be read as a path separator.

When I reach for it

Building a redirect or tracking URL by hand, reading a long encoded link from a log, or checking why a query parameter with & in it is being cut off.

Why is my whole URL encoded, including the slashes?

The tool uses encodeURIComponent, which encodes every reserved character. Encode only the value you are inserting into a URL, not the full address.

Why does decoding show an error?

The text contains a percent sign that isn’t followed by two hex digits, or it contains an invalid UTF-8 sequence.

What does %2520 mean?

It is a space that has been encoded twice: %20 encoded again becomes %2520. Decode it once more.

Does the tool send my text anywhere?

No. It runs in your browser.

Does decoding turn + into a space?

Yes. Decoding treats + as a space before decoding percent sequences, which is how HTML forms encode spaces in query strings.