URL Encode / Decode

Percent-encode strings for URLs or decode them back to readable text. Runs entirely in your browser.

Uses encodeURIComponent — encodes all special characters

Output will appear here…

Frequently asked questions

What is URL encoding?

URL encoding (also called percent-encoding) replaces unsafe characters in a URL with a percent sign followed by their hexadecimal ASCII code. For example, a space becomes %20 and & becomes %26. This ensures the URL is valid and correctly interpreted by browsers and servers.

What characters get encoded?

This tool uses encodeURIComponent, which encodes all characters except letters (A–Z, a–z), digits (0–9), and the unreserved characters - _ . ! ~ * ' ( ). Special characters like spaces, &, =, ?, #, and / are all encoded.

When should I encode a full URL vs individual components?

You should encode individual query parameter values, not full URLs. Encoding a full URL will also encode the slashes (//) and colons in https://, breaking it. This tool encodes individual values — use it on the value of a query parameter, not the whole URL.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for encoding full URLs and leaves characters like /, ?, #, and & intact. encodeURIComponent encodes everything except unreserved characters and is for encoding individual URL components like query parameter values. This tool uses encodeURIComponent.