URL Encoder/Decoder
Utility Tools
Encode special characters in URLs or decode percent-encoded strings. Essential for working with query parameters, form data, and safe URL construction.
Text to Encode
Result
Result will appear here...
encodeURIComponent
Encodes all special characters including : / ? # @ & = +
Use for: Query parameters, form data, path segments
encodeURI
Preserves URL structure characters like : / ? # @
Use for: Complete URLs where you want to preserve the structure
Common URL Encodings
Safe URLs
Convert special characters like spaces, ampersands, and unicode to URL-safe percent-encoded format.
Two Encoding Modes
Use encodeURIComponent for parameters or encodeURI to preserve URL structure characters.
URL Parser
Break down complete URLs into their components: protocol, host, path, and query parameters.
When to Use URL Encoding
Query Parameters
When passing user input or special characters as URL query parameters. Example: ?search=hello%20world
Form Data
When submitting forms via GET method or building application/x-www-form-urlencoded payloads.
API Requests
When constructing API URLs with dynamic parameters that may contain special characters.
Redirect URLs
When passing URLs as parameters (like OAuth callbacks), the inner URL must be encoded.