How to encode and decode URLs
- Choose Encode or Decode. Encode converts plain text or a URL into percent-encoded form; Decode reverses it.
- Choose Component or Full URI mode. Use Component for query string values and path segments — it encodes everything including
&,=,?. Use Full URI to encode a complete URL while keeping its structural characters intact. - Paste your input and the result appears instantly.
- Use Swap to flip the result back into the input and toggle direction — useful for double-checking a round-trip.
Common percent-encoded characters
| Character | Encoded | Notes |
|---|---|---|
| Space | %20 | Also written as + in form data |
| & | %26 | Separates query parameters |
| = | %3D | Separates key from value |
| ? | %3F | Marks the start of a query string |
| # | %23 | Fragment identifier |
| / | %2F | Path separator — encoded in component mode |
| + | %2B | Plus sign (not a space in component mode) |
| @ | %40 | User info in authority |
| é (UTF-8) | %C3%A9 | Multi-byte: each byte encoded separately |
| 🔗 (emoji) | %F0%9F%94%97 | 4-byte UTF-8 → 4 encoded sequences |
Component vs Full URI
Component mode (encodeURIComponent) is for encoding a single part of a URL — a query value, a path segment, or a fragment. It encodes everything that is not an unreserved character, including ? & = # / :.
Full URI mode (encodeURI) is for encoding a complete URL. It preserves the characters that give a URL its structure — : / ? # @ & = + , ; — so the URL remains valid after encoding.
Related tools: Base64 Encoder for binary-safe encoding, HTML Entity Encoder for escaping HTML special characters, or ROT13 Encoder for simple cipher encoding.
Learn more
For a deeper dive into which characters need encoding, the difference between encodeURI and encodeURIComponent, and common encoding mistakes, see the URL Encoding Explained guide.