URL Encode & Decode

Encode and decode URL components and full URLs

Encode & Decode

URL Encoder & Decoder

Encode and decode URLs and query parameters. Everything runs in your browser.

Encoding Mode

Component mode: encodes all special characters including :, /, ?, # (encodeURIComponent)

encodeURIComponent / decodeURIComponent

Decoded Length

0 characters

Encoded Length

0 characters

How it works

URL encoding (also called percent-encoding) replaces unsafe or reserved characters in URLs with a % followed by their hexadecimal value. For example, a space becomes %20 and an ampersand becomes %26. This tool offers two modes: Component mode uses encodeURIComponent() which encodes all special characters (best for query parameters), and Full URL mode uses encodeURI() which preserves URL-safe characters like : / ? # @ (best for complete URLs). Everything runs entirely in your browser — no data is sent to any server.

Frequently Asked Questions

What is URL encoding?
URL encoding (percent encoding) replaces unsafe characters in URLs with a % sign followed by two hex digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs are valid and unambiguous.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters that have meaning in URLs (like /, ?, #, &). encodeURIComponent encodes everything except basic alphanumeric characters — use it for query parameter values.
Why do spaces sometimes show as + and sometimes as %20?
The + for spaces comes from the application/x-www-form-urlencoded format used in HTML form submissions. In standard percent encoding (used in URLs), spaces are %20. Both are valid but used in different contexts.
Is URL decoding safe?
Decoding a URL string is safe — it just converts percent-encoded characters back to their original form. However, be cautious with decoded URLs before using them — they could contain malicious redirects or script injection attempts.

You might also like