URL Encode Decode Tool

Percent-encode text for safe use in a URL, or decode percent-encoded text back to plain text.

  • Free to use
  • Accurate results
  • No registration required
  • Works on all devices
Enter text and choose Encode or Decode to convert between plain text and percent-encoded (URL-safe) text.
Action

Your result

https%3A%2F%2Fcalcutool.com%2Fsearch%3Fq%3Demi%20calculator

Result

AI explanation

Formula

Percent-encoding replaces each unsafe character with %XX, its hexadecimal byte value

Worked example

Encode a search query with a space

Worked example: Encode a search query with a space
FieldValue
Texthttps://calcutool.com/search?q=emi calculator
Actionencode
Resulthttps%3A%2F%2Fcalcutool.com%2Fsearch%3Fq%3Demi%20calculator

Assumptions

  • Encodes using encodeURIComponent rules — suitable for individual query parameter values, not entire URLs (which have structural characters, like a colon or slash, that shouldn't be encoded wholesale).
  • Decoding malformed percent-encoding (e.g. a trailing "%" with no hex digits) shows an error.

Frequently asked questions

When do I need to URL-encode text?

When embedding text containing special characters (spaces, &, ?, =, /, etc.) inside a URL — for example, a search query with spaces, or a value passed as a query parameter.

Why does a space become %20?

%20 is the percent-encoded form of the space character's ASCII value (32, or 0x20 in hex) — percent-encoding replaces reserved/unsafe characters with a % followed by their hex byte value.

Should I encode an entire URL or just parts of it?

Encode individual parameter values, not the whole URL — encoding the full URL (including "https://" and "/") would break it, since characters like : and / are structurally meaningful in a URL.

Related calculators

Report a calculation issue