Skip to tool content
URL Encoder / Decoder
Encode and decode URLs with percent-encoding. Choose component-level (encodeURIComponent) or full URL (encodeURI). Auto-detects encoded input. Everything runs in your browser.
Plain Text
Type or paste text to URL-encode...
Encoded Output
Component (encodeURIComponent) encodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Use for query parameter values. Full URL (encodeURI) preserves URL structure characters like : / ? # @ &. Use for complete URLs.
What is URL Encoding?
URL encoding (percent-encoding) converts characters into a format that can be safely transmitted in URLs. Characters outside the allowed ASCII set are replaced with % followed by two hexadecimal digits representing the byte value. For example, a space becomes %20 and & becomes %26.
encodeURIComponent vs encodeURI
| Feature | encodeURIComponent | encodeURI |
|---|---|---|
| Encodes | All special chars | Only non-URL chars |
Preserves : / ? # @ | No | Yes |
| Use case | Query param values | Full URLs with special chars |
Common DevOps Use Cases
- API query parameters — Values with spaces, ampersands, or Unicode must be percent-encoded before appending to URLs.
- Webhook URLs — Callback URLs embedded in other URLs need double-encoding to preserve their structure.
- OAuth & OIDC — Redirect URIs and scope parameters require careful encoding to avoid authorization errors.
- Debugging encoded strings — Paste encoded URLs from logs or browser dev tools to see the original values.
- CI/CD variables — URLs stored in environment variables sometimes get double-encoded; decode to diagnose issues.