URL Encode / Decode

Encode or decode URL components instantly. Runs in your browser — no data sent to server.

Plain Text Input
URL-encoded Output
Output will appear here

About the URL Encoder

This tool URL encodes text into percent-encoded form so it can travel safely inside a query string or path. Spaces, ampersands, question marks and non-ASCII characters are all escaped as the URL specification requires, which prevents a value from breaking the URL structure.

To URL encode a value is to replace the characters that would otherwise change how a URL is parsed. A space becomes %20, an ampersand becomes %26, and a question mark becomes %3F — because unescaped, each of those means something structural to whatever reads the URL.

The ampersand is the classic bug. A search term like "salt & pepper" placed raw into a query string is read as two parameters instead of one value, so the second half of the term vanishes. Encoding it first is the fix.

Non-ASCII characters have to be encoded too, since URLs are defined over a limited ASCII set. Accented letters and emoji become several percent-escaped bytes each, which is why an encoded URL containing them looks much longer than the original.

How to use the URL Encoder

  1. Paste your text. Enter the value that has to go into a URL.
  2. Encode it. Reserved and non-ASCII characters are percent-escaped.
  3. Check the output. Confirm ampersands, spaces and slashes were escaped as expected.
  4. Copy the result. Use the encoded value in your query string or path.

URL Encoder features

  • Encodes text into percent-encoded form
  • Decodes percent-encoded text back
  • Escapes spaces, ampersands, question marks and non-ASCII characters
  • Copy the result
  • Runs in your browser; nothing is uploaded

Frequently asked questions

When do I need URL encoding?

Whenever a value goes into a query string or path and might contain a character with structural meaning. An unencoded ampersand starts a new parameter and an unencoded question mark starts the query — both silently truncate your value.

Which characters get encoded?

Spaces, ampersands, question marks, equals signs, slashes, hashes and anything outside plain ASCII. Each becomes a percent sign followed by its byte value in hexadecimal, so a space becomes %20.

Is it reversible?

Yes, decoding returns exactly the original text. The one trap is double-encoding: encoding an already-encoded string turns each % into %25, and the result decodes to the encoded form rather than the original.

Why do some tools use + for a space instead of %20?

Because form submissions use a slightly different encoding where + means space. In a path segment + is a literal plus, so the two are not interchangeable — %20 is the safer choice everywhere.