Encode or decode URL components and full URLs — handles percent-encoding, spaces, and special characters.
Use "Encode Component" for query parameter values (encodes & = ? and more). Use "Encode Full URL" to encode a complete URL while preserving its structure. Use "Decode" to convert %xx sequences back to readable text.
URLs can only contain a limited set of characters defined by the RFC 3986 standard. Any character outside this set — including spaces, accented letters, emoji, and many punctuation marks — must be encoded as a percent sign (%) followed by the character's two-digit hexadecimal value. For example: space → %20, © → %C2%A9, # → %23.
encodeURIComponent is the most commonly needed function. It encodes all characters except letters, digits, and - _ . ! ~ * ' ( ). Use it for any value you're placing inside a query string. encodeURI is for encoding a complete URL — it doesn't encode : / ? # [ ] @ ! $ & ' ( ) * + , ; = since those have structural meaning in a URL.
Space → %20 or +, & → %26, = → %3D, + → %2B, / → %2F, ? → %3F, # → %23, @ → %40, % → %25. When building URLs programmatically, always encode user-provided values before including them in query strings to prevent injection attacks.