URL Encode & Decode Online

Plain text / URL
Encoded output
Ready

Free Online URL Encoder and Decoder

Paste any text or URL and it is encoded or decoded instantly. Switch between Encode and Decode modes with one click. Choose between encodeURIComponent (best for query parameters) and encodeURI (best for full URLs). All processing is done in your browser.

What is URL encoding?

URL encoding (percent-encoding) replaces unsafe characters with a percent sign followed by two hexadecimal digits. For example, a space becomes %20, and an ampersand becomes %26. This ensures the URL is valid and correctly parsed by browsers and servers.

encodeURIComponent vs encodeURI

encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use it for individual query parameter values. encodeURI encodes a complete URL and leaves characters like /, ?, #, and & untouched so the URL structure is preserved.

Frequently asked questions

What is URL encoding?
URL encoding converts characters that are not safe in URLs into a percent-encoded format. A space becomes %20, an ampersand becomes %26, and so on. It ensures URLs are valid across all browsers and servers.
When should I use encodeURIComponent?
Use encodeURIComponent when encoding a value that will be embedded inside a URL query string, like a search term or a user-provided value. It encodes characters like &, =, and ? that would otherwise break the query string.
Does this tool save my data?
No. All encoding and decoding happens in your browser. Nothing is sent to any server.