Encode or decode URL-safe strings instantly.
URLs can only contain certain ASCII characters. Special characters like spaces, ampersands, slashes and non-ASCII Unicode letters must be percent-encoded before use in a URL. The URL Encoder converts any string to its percent-encoded form and decodes it back. Supports encodeURIComponent (encodes most special chars) and encodeURI (preserves URL structural chars) modes.
Encode hello world & more=info!
→ hello%20world%20%26%20more%3Dinfo%21
Decode reverses this back to the original string.
Web developers manually constructing query strings for API calls that contain spaces, ampersands, or special characters.
Debugging HTTP 400 errors caused by improperly encoded query parameters — paste the raw URL to see what needs encoding.
Marketers building UTM-tagged URLs with campaign names that contain spaces (e.g. "summer sale 2024" → "summer%20sale%202024").
Backend developers encoding file names or user-supplied strings before appending them to URL paths.
encodeURI encodes a complete URL, preserving structural characters like /, ?, &. encodeURIComponent encodes a value inside a URL — those structural characters are also encoded.-, _, ., ~. These are safe in any URL context.encodeURI encodes a full URL and leaves characters like / and ? intact. encodeURIComponent encodes a single component (like a query parameter value) and encodes those characters too. This tool uses component encoding.