ToolNimbus

URL Encoder / Decoder

Encode text so it's safe to drop into a URL, or decode a percent-encoded string back into readable text. It handles spaces, reserved symbols like & and ?, and full Unicode. Paste your text, choose Encode or Decode, and copy the result — all in your browser.

How to Use

Paste your text or URL into the box. Click Encode to convert special characters into percent-encoded form (for example a space becomes %20), or Decode to turn a percent-encoded string back into plain text. Copy the result with one click. If a string can't be decoded, the tool tells you why.

Why This Tool Is Useful

URLs can only contain a limited set of characters. Anything else — spaces, ampersands, question marks, emoji, non-Latin letters — must be percent-encoded, or the link breaks or gets misread. This tool is essential when you're building query strings, debugging API requests, handling redirect parameters, or reading an encoded URL from a log. It uses the browser's own encodeURIComponent and decodeURIComponent, so the results exactly match what your code will produce.

What Percent-Encoding Does

Percent-encoding replaces an unsafe character with a % followed by its hexadecimal byte value. A space becomes %20, an ampersand becomes %26, and so on. Multi-byte Unicode characters become several percent-encoded bytes. This keeps the URL unambiguous so servers and browsers parse it the same way.

encodeURIComponent vs encodeURI

This tool uses encodeURIComponent, which encodes reserved characters like &, =, ?, and / — the right choice when you're encoding a single value to place inside a query string or path segment. encodeURI (used for a whole URL) deliberately leaves those structural characters alone. If you're encoding one parameter value, component-encoding is what you want.

Common Places You Need It

Percent-encoding shows up constantly in web work:

  • Building query strings like ?q=hello%20world.
  • Passing a URL as a parameter (for OAuth redirects, for example).
  • Sending form data or API request bodies.
  • Reading encoded values back out of a log or analytics tool.
  • Fixing links that broke because of a space or special character.

Common Characters and Their Encodings

CharacterEncoded as
space%20
" (quote)%22
# (hash)%23
% (percent)%25
& (ampersand)%26
+ (plus)%2B
/ (slash)%2F
: (colon)%3A
= (equals)%3D
? (question mark)%3F
@ (at)%40

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) converts characters that aren't allowed in a URL into a % followed by their hex value, so the URL stays valid and unambiguous.

Why does a space become %20?

Spaces aren't allowed in URLs. 20 is the hexadecimal code for a space character, so it's written as %20. Some systems also encode a space as a plus sign in form data.

What's the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes reserved characters like & and ?, which is right for a single value. encodeURI leaves those alone because it's meant for a whole URL. This tool uses encodeURIComponent.

Why won't my string decode?

Decoding fails if the text contains a stray % that isn't part of a valid %XX sequence. Check for lone percent signs or truncated codes.

Does it handle emoji and non-English text?

Yes. Unicode characters are encoded as their UTF-8 bytes, each shown as a percent-encoded value, and decode back correctly.

Is my text sent to a server?

No. Encoding and decoding run entirely in your browser, so your text never leaves your device.

Related Tools