https:// %20 %3F ?key=value %26 %3D &param= %2F %40 #fragment encodeURI() decodeURI()

URL Encoder/Decoder

Encode and decode URLs in real-time. Supports encodeURIComponent, encodeURI, and RFC 3986 standards. Character breakdown, batch mode, drag & drop. Free, instant, 100% browser-based.

Real-time
How it works: Choose Encode or Decode mode, pick an encoding standard, then type or paste your text on the left. The result updates instantly on the right. Use Batch mode to process multiple URLs at once (one per line).

Input

Drop file here

Encoded Output

Input Length 0
Output Length 0
Encoded Chars 0
Size Change 0%

What is URL Encoding?

URL encoding (percent-encoding) converts characters that are not allowed or have special meaning in URLs into a safe format. Each unsafe character is replaced with a % followed by two hexadecimal digits representing its UTF-8 byte value.

For example, a space becomes %20, an ampersand & becomes %26, and a question mark ? becomes %3F. This ensures URLs are transmitted correctly across the internet without ambiguity.

Encoding Standards Compared

StandardPreservesEncodesBest For
encodeURIComponent A-Z a-z 0-9 - _ . ! ~ * ' ( ) Everything else including : / ? # & = @ Query parameter values, form data
encodeURI : / ? # & = @ + $ , ; and above Spaces, non-ASCII, and a few special chars Complete URLs (preserves structure)
RFC 3986 A-Z a-z 0-9 - _ . ~ Everything else including ! * ' ( ) Strictest encoding, API signatures (OAuth)
Advertisement
Ad

How to Use — 3 Simple Steps

01

Choose Your Mode

Click Encode to convert text to URL-safe format, or Decode to convert percent-encoded strings back to readable text. Pick the encoding standard that fits your use case.

02

Enter Your Text

Type or paste your URL / text in the input panel. You can also upload a .txt file or drag & drop it. Enable Batch mode to process multiple strings at once, one per line.

03

Copy Your Result

The output updates instantly as you type. Click Copy to copy to clipboard or Download to save as a file. Check the Character Breakdown to see each encoded character.

Common URL-Encoded Characters

CharacterEncodedDescription
(space)%20Space character
!%21Exclamation mark
#%23Hash / fragment identifier
$%24Dollar sign
&%26Ampersand (query separator)
+%2BPlus sign
/%2FForward slash (path separator)
=%3DEquals sign (key=value separator)
?%3FQuestion mark (query start)
@%40At sign

Pro Tips

Use encodeURIComponent for Query Params

When building URLs with ?key=value pairs, always encode the values with encodeURIComponent. This ensures special characters like & and = in the value don't break the URL structure.

Don't Double-Encode

If your string already contains %XX sequences, decoding and re-encoding will change them. Use the Swap button to quickly check if your string is already encoded.

+ vs %20 for Spaces

In HTML form submissions (application/x-www-form-urlencoded), spaces are encoded as +. In URLs, spaces should be %20. This tool uses %20 for standards compliance.

Use RFC 3986 for OAuth

OAuth signature base strings require strict RFC 3986 encoding. Unlike encodeURIComponent, RFC 3986 also encodes !, ', (, ), and *.

Advertisement
Ad

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) converts special characters into a format that can be safely transmitted in a URL. Characters that are not allowed in URLs (like spaces, &, =, ?) are replaced with a percent sign followed by two hexadecimal digits (e.g., space becomes %20).

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL but preserves characters that have special meaning in URLs (like ://?#&=). encodeURIComponent encodes everything except letters, digits, and a few safe characters (- _ . ! ~ * ' ( )). Use encodeURIComponent for query parameters and encodeURI for complete URLs.

When should I use URL encoding?

You should URL-encode any data being passed as URL parameters, form data in GET requests, or any string that will be embedded in a URL. Common use cases include API query strings, redirect URLs, and any user input that will appear in URLs.

What is RFC 3986?

RFC 3986 is the official standard that defines the syntax of URIs (Uniform Resource Identifiers). Its encoding rules are stricter than encodeURIComponent — it also encodes characters like ! ' ( ) * that encodeURIComponent leaves unencoded. This is the safest option for encoding arbitrary data.

Is my data processed on a server?

No. All URL encoding and decoding happens entirely in your browser using JavaScript. No data is sent to any server. Your URLs and text remain completely private.