%48%65%6C%6C%6F = Hello

URL Encoder / Decoder

Encode special characters to percent-encoded URLs and decode URL-encoded strings back to plain text. Supports RFC 3986 modes, Unicode, and full character-by-character breakdown.

Share this tool

Any Unicode text is supported. Special characters will be percent-encoded.

Paste a string containing %XX sequences. Plus signs are decoded as spaces.

Settings

Direction

Encoding Mode

Space Handling

Quick Load:

Converting...

Enter text or a URL-encoded string to encode or decode with character-by-character breakdown.

What Is URL Encoding and How Does It Work?

URL encoding, also known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Locator (URL) under certain circumstances. Defined in RFC 3986, it replaces unsafe ASCII characters with a percent sign (%) followed by two hexadecimal digits representing the character's byte value. This ensures that data can be safely transmitted across networks and parsed correctly by web servers, APIs, and browsers.

The encoding process distinguishes between unreserved and reserved characters. Unreserved characters — uppercase and lowercase letters, digits, hyphen, period, underscore, and tilde — never need encoding because they are safe in all URL contexts. Reserved characters, such as /, ?, &, and =, have special syntactic meaning in URLs and must be encoded when they appear as data rather than as delimiters.

Our tool supports three encoding modes so you can choose the right level of encoding for your use case. The "Encode All" mode percent-encodes every non-unreserved character, which is useful when you need to pass arbitrary text through a URL parameter. The "Special Only" mode targets reserved and unsafe characters while leaving letters and digits untouched. The "Spaces Only" mode is the minimal option, encoding just space characters when you know the rest of your text is already URL-safe.

RFC 3986 Reserved Characters

These characters have special meaning in URLs and must be percent-encoded when used as data. The table shows each reserved character and its percent-encoded equivalent.

CharacterEncodedPurpose in URLCharacterEncodedPurpose in URL
:%3AScheme separator/%2FPath separator
?%3FQuery start#%23Fragment start
[%5BIPv6 literal]%5DIPv6 literal
@%40User info!%21Sub-delimiter
$%24Sub-delimiter&%26Query pair separator
'%27Sub-delimiter(%28Sub-delimiter
)%29Sub-delimiter*%2ASub-delimiter
+%2BSub-delimiter,%2CSub-delimiter
;%3BSub-delimiter=%3DKey-value pair
%20Space

Encoding Modes Compared

Different situations call for different levels of URL encoding. Our three modes cover the full spectrum from minimal to comprehensive encoding, so you can pick the right tool for the job without over-encoding or leaving characters unprotected.

ModeEncodesLeaves untouchedBest use
Encode AllEverything except A-Z, a-z, 0-9, -, _, ., ~Unreserved chars onlyPassing arbitrary text, Unicode, or binary data in URLs
Special OnlyReserved chars and spacesLetters, digits, unreserved charsSafe text that may contain URL metacharacters
Spaces OnlySpaces onlyAll other charactersText that is already URL-safe except spaces

Common URL Encoding Use Cases

Use caseWhy encoding matters
API query parametersSpecial characters in search terms or filter values would break the URL structure without encoding.
OAuth callbacksRedirect URIs containing query strings must be fully encoded to prevent parameter injection.
Email addresses in URLsThe @ symbol is reserved and must be encoded to %40 when used as data.
File paths with spacesSpaces break URL parsing; encoding them as %20 or + ensures valid links.
Unicode in URLsNon-ASCII characters like emoji must be UTF-8 encoded and percent-encoded before transport.
Form submissionsapplication/x-www-form-urlencoded requires spaces as + and special chars as %XX.

Frequently Asked Questions

What is the difference between %20 and + for spaces?

Both represent a space, but they are used in different contexts. %20 is the RFC 3986 standard and works everywhere in a URL — in paths, query strings, and fragments. The plus sign + is a legacy convention from the application/x-www-form-urlencoded media type used by HTML forms. Many APIs and modern frameworks accept both, but %20 is the safer default.

How do you encode a full URL?

When encoding a complete URL, you should only encode the data portions — the path segments, query values, and fragment — not the structural characters like :// or ?. Use the "Special Only" mode in our tool to encode just the unsafe parts while leaving the URL structure intact. If you need to pass the entire URL as a parameter to another URL, use "Encode All" to encode every non-unreserved character.

Can URL encoding handle Unicode and emoji?

Yes. Our tool encodes Unicode characters using UTF-8 first, then percent-encodes each byte. For example, the emoji "👋" is encoded as %F0%9F%91%8B because its UTF-8 representation is four bytes. This is the standard behavior defined by RFC 3986 and is supported by all modern browsers, APIs, and web frameworks.

Why does my decoded string look wrong?

The most common cause is an invalid percent-encoding sequence. Every % must be followed by exactly two valid hexadecimal characters (0-9, A-F, a-f). Trailing % signs, sequences like %ZZ, or missing digits will cause a decode error. Our decoder pinpoints the exact position of any invalid sequence so you can fix it quickly.

Is URL encoding the same as HTML encoding?

No. URL encoding uses percent signs and hex values (%20) to make data safe for URLs. HTML encoding uses named or numeric entities (&, ') to make data safe for HTML documents. They serve different purposes and are not interchangeable. Use URL encoding when building links or API requests, and HTML encoding when generating web page content.

Does URL encoding provide encryption or security?

No. URL encoding is purely a transport mechanism — it is not encryption. Anyone can decode a percent-encoded string instantly with no key or password. If you need to protect sensitive data, use proper encryption such as AES or TLS. URL encoding only ensures that special characters do not interfere with URL parsing; it does not hide, compress, or secure the underlying data in any way.