URL encode / decode
Encode special characters for safe URL usage
Which mode should I use?
encodeURIComponent — encodes everything including : / ? & =. Use when encoding a query parameter value.
encodeURI — keeps URL structure intact, only encodes spaces and unsafe chars. Use when encoding a full URL.
Encode and decode URLs for safe web usage
Free online URL encoder and decoder. Encode special characters for safe URL usage or decode encoded URLs instantly.
Handle special characters safely
Convert spaces, ampersands, slashes and other reserved characters into their percent-encoded equivalents for safe use in query strings and API endpoints.
Instant bidirectional conversion
Switch between encode and decode modes to quickly format URLs for browser address bars or decode them for debugging server logs.
Related tools
Frequently asked questions
What is URL encoding used for?
URL encoding (percent-encoding) is used to safely transmit special characters in URLs, query parameters and API requests.
Does it encode the entire URL or just the parameters?
The tool encodes the exact text you provide. It is best used for encoding query parameter values rather than the base URL structure.
