URL Encode Special Characters

Percent-encode spaces, @, #, /, ? and other special characters for a URL. See exactly which characters are escaped and which stay untouched.

Loading tool…

How It Works

URL encoding exists because a URL can only carry a limited alphabet. RFC 3986 reserves characters such as /, ?, #, & and = as syntax, so if one of them is part of a value it has to be written as a percent escape — a percent sign followed by two hexadecimal digits — before the URL can be sent. This page opens the URL encoder in encode mode and shows exactly which characters change.

What stays untouched. The encoder leaves the unreserved set and a few sub-delimiters alone: A–Z, a–z, 0–9, hyphen, underscore, period, tilde, exclamation mark, asterisk, apostrophe, and both round brackets. These characters survive as themselves, which is why a simple word such as report-final_v2.txt passes through unchanged.

What gets escaped. Everything else becomes a percent triplet built from the UTF-8 bytes of the character. A space is %20, the at sign is %40, a slash is %2F, a question mark is %3F, an equals sign is %3D, an ampersand is %26, a hash is %23 and a plus is %2B. Non-ASCII text expands to one triplet per byte, so a single emoji becomes four triplets and an accented letter becomes two.

Why the plus sign is escaped. In a URL query, + is a literal plus; only form encoding treats it as a space. Encoding a plus as %2B is what keeps a value that genuinely contains a plus from being read back as a space by a form parser.

Whole-string behaviour. The encoder does not split a URL into protocol, host, path and query. If you paste an entire URL, the colons and slashes are encoded too and the result is no longer clickable — useful when the URL is itself a parameter value, wrong when you meant to encode only the query. Encode the value, then paste it into the URL you are building.

Already-encoded input is encoded again. A literal % is escaped to %25, so pasting %20 returns %2520 rather than %20. That is correct for a single pass: the input contained a percent character, and a lone percent is illegal in a URL. If a value has already been encoded once, do not run it through again.

How to encode a value

  1. Paste only the value that will sit inside the URL — a search term, a file name, a redirect target.
  2. Confirm the mode selector reads Encode rather than Decode.
  3. Copy the result and paste it into the query parameter you are building.
  4. Check the output once: a second %25 sequence means the input had already been encoded.

Common characters and their escapes

CharacterEncodedWhere it matters
space%20Query values and file names
@%40Email addresses used as parameters
/%2FA path passed as a value rather than used as a separator
%%25Any text that already contains a percent sign
+%2BValues where a plus must not be read as a space

Examples

Input

email@example.com

Output

email%40example.com

The at sign becomes %40; letters and the period stay as they are.

Input

100% sure

Output

100%25%20sure

A literal percent is escaped to %25 and the space to %20, so nothing is misread.

Input

%20

Output

%2520

Boundary case: already-encoded input is encoded again, because the percent sign itself was never legal in a URL.

Input

hello/world?x=1&y=2

Output

hello%2Fworld%3Fx%3D1%26y%3D2

Boundary case: syntax characters are escaped along with everything else, so the result is a value rather than a path.

Frequently Asked Questions

Which special characters does it encode?
Every character outside a small safe set. Letters, digits, hyphen, underscore, period, tilde, exclamation mark, asterisk, apostrophe and round brackets stay as they are. Space, at, slash, question mark, equals, ampersand, hash, plus, percent, angle brackets, quotes and all non-ASCII text are converted to percent triplets.
Why is a space %20 and not +?
Because + is only a space convention for form submission, not for URL syntax. RFC 3986 requires a literal space in a URL to be escaped as %20, and the encoder follows that rule. If a server expects form encoding, it will decode %20 as a space anyway, so %20 is the safer of the two in every case.
Why did my whole URL turn into percent signs?
The encoder treats the input as one value, so it escapes the colons and slashes of the URL itself. That is right when the URL is a parameter of another URL, and wrong when you only meant to encode the query string. Paste just the value that needs escaping, then place the result inside the URL you are building.
What happens if I encode an already encoded string?
It is encoded a second time. The percent sign of an existing escape becomes %25, so %20 turns into %2520. That is not a bug: a literal % is not legal in a URL, and the encoder has no way to know whether you meant an escape or a character. Pasted log values are the usual source of this.

Limitations & Accuracy

The whole string is encoded as one value, so a complete URL loses its colons and slashes and stops being clickable. Already-encoded input is encoded again, turning %20 into %2520. Spaces always become %20, never +, and the encoder requires valid Unicode input: a lone surrogate is reported as Malformed URI component rather than silently replaced.

Related Tools