Generators

URL Encoder & Decoder

Percent Encoding

URL Encoder / Decoder

Enter text or a URL to encode or decode it. Use batch mode to process multiple entries at once.

0 characters

Common URL Encoding Reference

CharacterEncodedNote
%20Space
!%21
"%22
#%23
$%24
%%25
&%26
'%27
+%2B
,%2C
/%2FPath separator
:%3AProtocol separator
=%3DQuery separator
?%3FQuery start
@%40Email
[%5B
]%5D

Tool features

Fast, private URL encoding and decoding
4 features

URL Encoding

Encode special characters to make URLs safe for transmission

URL Decoding

Decode percent-encoded URLs back to readable text

Batch Processing

Process multiple URLs at once, one per line

Two Encode Modes

encodeURIComponent (all) or encodeURI (path-safe) modes

What is URL encoding & how it works

Why special characters become %XX in links

URL encoding (percent-encoding) replaces characters that are not allowed or have special meaning in a URL with a % followed by their byte value in hex, so a space becomes %20 and & becomes %26. Non-ASCII text is converted to UTF-8 bytes first.

Which characters to encode depends on where the text goes. A query-string value must escape &, =, ? and /, while a whole URL must keep them. This tool offers both JavaScript behaviours: encodeURIComponent for values and encodeURI for full URLs.

encodeURIComponent
Escapes everything except letters, digits and - _ . ! ~ * ' ( ); use for parameter values.
encodeURI
Leaves URL structure (: / ? # & =) intact; use for a complete URL.
Reserved characters
Characters with meaning in a URL that must be escaped inside values.

How to use this tool

Encode or decode URLs in four steps
1
Paste your text
Paste a URL, query value or encoded string; turn on batch mode to process one per line.
2
Encode or decode
Choose Encode to percent-encode, or Decode to turn %XX sequences back into text.
3
Pick the mode
Encode all characters (encodeURIComponent) for values, or keep URL structure (encodeURI) for full URLs.
4
Copy the result
Copy the output into your code, link or request.

Frequently asked questions

Common questions about URL encoding
5 Q&A

Whenever you put user input or arbitrary text into a URL, most often query-string values and path segments. Encoding stops characters like &, # and spaces from breaking the URL.

%20 is correct everywhere in a URL. + means a space only in application/x-www-form-urlencoded data, such as HTML form submissions.

Use encodeURIComponent for a single value you are inserting into a URL. Use encodeURI only on a complete URL you want to make safe without breaking its /, ? and & separators.

The input contains a % not followed by two hex digits, or a sequence that is not valid UTF-8. Encode stray % characters as %25.

No. Encoding and decoding run in your browser with the built-in JavaScript functions.