BAD SKY.NET

URL Encoder / Decoder

Paste any text or URL — the tool auto-detects whether to encode or decode. You can always switch manually.

Input
0 chars · 0 bytes
Output
0 chars · 0 bytes
Output will appear here…

Quick examples

Encoding style comparison

CharacterRFC 3986 (rawurlencode)Form-encoded (urlencode)Description
(space)%20+Space character — key difference between the two styles
!%21%21Exclamation mark
#%23%23Hash / fragment delimiter
&%26%26Query parameter separator
+%2B%2BPlus sign — literal plus must be encoded in both styles
/%2F%2FPath separator
:%3A%3AColon
=%3D%3DKey-value separator
?%3F%3FQuery string start
~~%7ETilde — unreserved in RFC 3986, encoded in form style
@%40%40At sign

What is URL encoding?

URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted in a URL. Characters that have special meaning in a URL — such as &, =, ?, and spaces — are replaced with a percent sign followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20.

This is defined in RFC 3986 and is essential for building valid URLs in web applications, APIs, email links, and anywhere a URL needs to carry arbitrary data safely.

RFC 3986 vs application/x-www-form-urlencoded

RFC 3986 — rawurlencode()

The standard defined in RFC 3986. Spaces are encoded as %20, the tilde ~ is left unencoded, and all percent-encoded values use uppercase hex digits. This is the encoding you should use in URL paths and most modern APIs. PHP's rawurlencode() and JavaScript's encodeURIComponent() follow this standard.

application/x-www-form-urlencoded — urlencode()

The encoding used by HTML forms when submitted with method="POST" or method="GET". Spaces become + instead of %20, and the tilde ~ may be encoded as %7E. PHP's urlencode() uses this format. When decoding, + is treated as a space.

How our auto-detect works

This tool automatically detects whether the input needs encoding or decoding. If the input contains percent-encoded sequences like %20, it switches to decode mode. Otherwise it encodes. For decoding, it also detects the style: if the input contains bare + signs (not %2B), it uses form-encoded decoding (+ → space). Otherwise it uses RFC 3986 decoding where + stays as a literal plus sign. You can always override the action or decode style manually.

Common URL encoding problems

Double encoding

Double encoding happens when an already-encoded string is encoded again. For example, %20 becomes %2520 because the % itself gets encoded. This usually indicates a bug where encoding is applied more than once in a processing pipeline. Our tool automatically detects double encoding and warns you.

Space encoding: %20 vs +

In URL paths, spaces should be encoded as %20. In query strings (especially from HTML forms), spaces are commonly encoded as +. Both are valid in query strings, but + is only valid in the query portion of a URL. Our decoder handles both formats and auto-detects which style was used.

Unicode and UTF-8

Non-ASCII characters (like accented letters, CJK characters, or emoji) are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, the character é (U+00E9) becomes %C3%A9 (two UTF-8 bytes). This tool fully supports UTF-8 encoding and decoding.