URL Encoder / Decoder
Encode or decode URLs and query string parameters.
What is URL Encoding?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a format that can be safely transmitted. Special characters like spaces, ampersands, and equals signs are replaced with a percent sign followed by their hexadecimal ASCII code. For example, a space becomes %20.
How to Use This Tool
- Paste your URL or text into the input field.
- Click "Encode" to convert special characters to their percent-encoded equivalents.
- Click "Decode" to convert percent-encoded text back to readable form.
Why URL Encoding Matters
Web browsers and servers communicate via HTTP, which requires URLs to contain only a limited set of ASCII characters. When URLs contain spaces, Chinese characters, or special symbols, they must be encoded before transmission. Failing to encode URLs correctly leads to broken links, failed API calls, and security vulnerabilities.
Frequently Asked Questions
What is the difference between %20 and + for spaces?
%20 is the standard URL encoding for a space. The + sign also represents a space, but only in query string parameters (application/x-www-form-urlencoded). Use %20 for paths and full URLs.
Should I encode the entire URL?
No. Only encode the values within query parameters or path segments. Encoding the entire URL will break the protocol and domain parts.