URL Encoder / Decoder

Encode text to be URL-safe, or decode a URL-encoded string back to plain text.

🔒 All processing happens in your browser

Why does %20 show up everywhere? Read: URL Encoding Explained

Designing an API's URLs from scratch? Read: Query Strings vs. Path Parameters

How it works

This tool runs the browser's native encodeURIComponent()/decodeURIComponent() functions entirely client-side, replacing unsafe characters with a % followed by their hexadecimal byte value — so a space becomes %20 and an ampersand becomes %26.

When you’d use this

  • Encoding a search query or redirect parameter before inserting it into a URL
  • Debugging why a URL with an unencoded & is silently truncating part of a query string
  • Decoding a percent-encoded value copied from a browser address bar or server log

Common questions

What's the difference between encodeURIComponent and encodeURI?+

encodeURIComponent (what this tool uses) encodes almost everything except letters, numbers, and a few safe symbols — meant for encoding a single value going into a URL. encodeURI leaves URL-structural characters like / and : untouched, since it's meant for encoding a whole URL, not one piece of it.

Why does a space sometimes become + instead of %20?+

Both are valid in different contexts. %20 is the general percent-encoding for a space. + specifically means "space" only within an application/x-www-form-urlencoded query string (the format traditional HTML forms use) — outside that context, a literal + means the plus character itself.

Do I need to encode an entire URL, or just parts of it?+

Only the dynamic parts — a search term, a filename, a parameter value. Encoding an entire URL including http:// and the domain would break it, since encoding turns the structural slashes and colons into percent-sequences too.

Is URL encoding the same as URL-safe Base64?+

No — they're unrelated. URL encoding represents special characters as %XX sequences. URL-safe Base64 is a variant of Base64 encoding that swaps a couple of characters (+ and /) for URL-safe alternatives (- and _) so the Base64 output itself doesn't need further URL encoding.