URL Encoder/Decoder

Encode or decode URLs and query parameters. Convert special characters to percent-encoded format.

Input
Press Ctrl+Enter to encode
Output
What is URL Encoding?

URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted over the Internet. Special characters are replaced with a "%" followed by their hexadecimal ASCII value.

encodeURI vs encodeURIComponent:
encodeURI()

Encodes a complete URL

Preserves: : / ? # [ ] @ ! $ & ' ( ) * + , ; =

encodeURIComponent()

Encodes a URL component (query param)

Encodes everything except: A-Z a-z 0-9 - _ . ~

Common Encodings:

Space→%20 &→%26 =→%3D ?→%3F /→%2F +→%2B #→%23

Frequently Asked Questions

Use Encode URL when encoding a complete URL (preserves ://?#). Use Encode Component when encoding query parameter values, form data, or any string that will become part of a URL.

You might be using encodeURIComponent on a full URL, which encodes the :// and breaks the URL structure. Use encodeURI for complete URLs, or only encode the parameter values.

Both represent spaces, but in different contexts. %20 is the standard URL encoding. + is used in application/x-www-form-urlencoded format (HTML forms). Modern APIs typically prefer %20.