🔗 URL Encode & Decode

Percent-encode text for URLs or decode encoded URLs back to plain text. Runs entirely in your browser.

What is URL Encoding (Percent-Encoding) and When Do You Need It?

URL encoding, also known as percent-encoding, is a method of converting characters that aren't allowed in a URL into a safe format using a % sign followed by two hexadecimal digits. This is defined in RFC 3986 and is essential for properly constructing URLs with special characters, spaces, or non-ASCII text.

Characters That Must Be URL-Encoded

Common Developer Scenarios for URL Encoding

URL Encoding vs HTML Entity Encoding — What's the Difference?

URL encoding (%26) is used in URLs and query strings. HTML entity encoding (&) is used in HTML documents. They serve different purposes: URL encoding ensures URL validity, while HTML encoding prevents XSS and ensures correct rendering in browsers. Use the right encoding for the right context.

How This URL Encoder/Decoder Works

This tool uses JavaScript's built-in encodeURIComponent() and decodeURIComponent() functions, which follow the RFC 3986 standard. Toggle between Encode and Decode mode, paste your text, and press Ctrl+Enter or click the button. Use the Swap feature to quickly decode an encoded URL and re-encode it.