URL Encoder & Decoder
Free online URL encoder and decoder. Encode special characters for URLs, decode percent-encoded strings, and parse URL components. Supports multiple encoding modes.
Encoding Modes Explained
- Component: Encodes everything except
A-Z a-z 0-9 - _ . ~. Use for query parameter values. - Full URL: Preserves URL structure characters like
: / ? # @ &. Use for encoding complete URLs. - Query String: Like Component, but encodes spaces as
+instead of%20. Common in form submissions.
URL Encoder and Decoder converts unsafe URL characters into percent-encoded values and decodes them back to readable text. It is essential when building links with dynamic values, sending query parameters to APIs, or troubleshooting broken redirects. If your data includes encoded binaries or markup fragments, combine this workflow with the Base64 Encoder and HTML Entity Encoder for cleaner transport across systems.
How to use
- Paste text, a URL fragment, or a full URL into the input.
- Choose encode or decode mode depending on your task.
- Select the correct encoding style: component, full URL, or query string style.
- Copy the output and test it in your app, browser, or API client.
When creating human-readable addresses, generate a clean path segment with Slug Generator first, then encode only the parts that still contain reserved characters.
Key features
- Encode and decode in one place for fast debugging.
- Multiple modes to match JavaScript
encodeURI,encodeURIComponent, and form-like query behavior. - UTF-8 aware handling for international characters.
- Client-side processing for private, local conversion.
Common use cases
- Building safe API request URLs from user input.
- Encoding search terms and filter values in query parameters.
- Debugging incoming callback URLs from third-party integrations.
- Cleaning redirect targets before storing or sharing links.
Technical details
URL encoding is defined in RFC 3986 and represents bytes as %XX hexadecimal pairs. Input text is first converted to UTF-8 bytes, then unsafe bytes are escaped. Example mappings include space to %20, ampersand to %26, equals to %3D, and non-ASCII bytes such as 日 to %E6%97%A5.
encodeURIComponent is usually correct for individual path segments and query values because it escapes separators like &, =, ?, and /. encodeURI keeps structural URL delimiters so full links remain parseable. Query-string style encoders may convert spaces to +, which is common for HTML forms.
Encoding order matters. If you encode an entire URL after already encoding query values, you may get double encoding. A typical symptom is %2520, which decodes once to %20 and twice to a space. Decode to a clean baseline, then encode exactly once per component.
For tokenized links that include Base64 payloads, prefer URL-safe Base64 from Base64 Encoder before appending values. If a value contains HTML fragments, escape for markup with HTML Entity Encoder after URL rules are handled.
FAQ
Should I use encodeURI or encodeURIComponent for query values?
Use encodeURIComponent for query parameter keys and values. Use encodeURI only when encoding an already structured full URL.
Why do some systems use plus signs instead of %20 for spaces?
Traditional form encoding uses + for spaces in query strings. Percent encoding with %20 is more general and is common in modern APIs.
Can this tool fix double-encoded URLs?
Yes, you can decode repeatedly until the value is readable, then re-encode once in the right mode. This helps clean inputs like %2520 that should be %20.
Do I need URL encoding if I already use Base64?
Sometimes yes. Standard Base64 includes characters like + and / that can break URLs, so URL-safe Base64 or additional URL encoding may still be required.
Privacy note
All transformations run locally in your browser. Your URLs and parameters are not transmitted or stored by the service.
Related Tools
Base64 Encoder & Decoder
Free online Base64 encoder and decoder. Convert text to Base64 and decode Base64 to text instantly. Supports URL-safe encoding and Unicode.
HTML Entity Encoder
Free online HTML entity encoder and decoder. Convert special characters to HTML entities and vice versa. Prevent XSS attacks and display special characters safely.
Slug Generator
Free online slug generator. Convert text to URL-friendly slugs with customizable options for SEO-optimized permalinks.