URL Encoder & Decoder
Convert unsafe URL characters to percent-encoded hex codes (`%20`, `%26`, `%3D`), or restore encoded URLs back into readable text format.
What is the URL Encoder & Decoder?
This tool converts characters into percent-encoded ASCII representations (URL encoding) and restores encoded URL strings back into readable text according to RFC 3986.
RFC 3986 Percent-Encoding and Character Sets
RFC 3986 divides the ASCII character space into unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) and reserved characters (! * ' ( ) ; : @ & = + $ , / ? # [ ]). Reserved characters have structural meanings in URIs (like separating host from path or delimiting query pairs). When a reserved character is used as literal data rather than a delimiter, it must be percent-encoded: the byte value is converted to a two-digit hexadecimal number prefixed with % (e.g. space becomes %20, & becomes %26).
How to Use the URL Encoder & Decoder
Choose Encode or Decode Mode
Select "Encode" to sanitize special characters for URLs, or "Decode" to read percent-encoded URLs.
Paste Your Text or URL
Enter your link or query string into the input field.
Choose Encoding Granularity
Select "Component" for query parameter values, or "Full URL" to preserve protocol and domain structure.
Key Settings & Parameters
| Setting | What It Controls | Recommended Default |
|---|---|---|
| Encoding Mode | Component mode (encodeURIComponent) encodes all delimiters; Full URL mode (encodeURI) leaves ://, ?, &, and = unencoded. | Use Component for parameter values, Full URL for complete website addresses |
| Space Representation | Switch between standard RFC 3986 %20 and form-style +. | %20 for REST APIs and modern links |
Common Pitfalls to Avoid
-
• Using encodeURI on query string values containing & or =encodeURI preserves & and =, meaning a search query like "cats & dogs" will break the query string into two parameters. Use Component mode for parameter values.
-
• Double-encoding already encoded URLsEncoding %20 a second time results in %2520 (where the % is encoded as %25), causing broken links.
Pro Tips for Best Results
- When passing another URL inside a query parameter (e.g. redirect=https://example.com/page), always use Component encoding so the inner URL does not prematurely terminate the outer URL query string.
Local Processing Guarantee
Zero server uploads. Private query parameters, internal intranet links, and session tokens remain on your local machine.
When to Use
- Encoding parameters passed into URL query strings (e.g. searching "coffee & tea" -> q=coffee%20%26%20tea).
- Sanitizing UTM campaign tags and redirection parameters in marketing links.
- Decoding long, messy tracking links to inspect original landing destinations.
Encoding entire HTML documents or binary files (use Base64 for binary data).
- • Supports up to standard URI length constraints. RFC 3986 defines no theoretical maximum, though common web servers (Apache, Nginx) enforce 8KB limits.