Converter · SOTA URL.canParse() + RFC 3986
URL Encoder & Decoder
Encode and decode URLs with full RFC 3986 compliance. Per-component modes (path, query, fragment), URL.canParse() validation, URLSearchParams visualization.
How to Use URL Encoder in 3 Steps
- Configure. Paste a URL or component to encode. Select the component type: full URL, path segment, query key/value, or fragment. Each has different RFC 3986 rules.
- Process. See encode and decode results side-by-side. The tool validates input with URL.canParse() and highlights parts that would break in a browser.
- Export. For query strings, the URLSearchParams table breaks down every parameter: copy keys, values, or reconstruct with modifications.
Why URL Encoder on Pixlane
URL encoding is needed for building query strings, handling user-generated paths, escaping redirect targets, and anywhere special characters must be transmitted safely through HTTP. Pixlane uses the modern URL.canParse() (ES2024) for pre-validation and distinguishes per-component encoding rules per RFC 3986.
- RFC 3986 Compliant: Respects the different reserved-character sets for path, query, and fragment components. Most tools blindly apply encodeURIComponent to everything, over-encoding safe characters.
- URL.canParse() Validation: Uses the ES2024 URL.canParse() method to validate URLs before encoding, catches malformed input that would silently break browsers.
- Query String Table: URLSearchParams parses complex queries into a readable key/value table. Handles repeated keys (?a=1&a=2), missing values, and URL-safe base64 payloads.
- Per-Component Encoding: Path segments allow '&', query values need '+' as space, fragments allow '#' inside. The tool picks the right rules automatically.
Frequently Asked Questions
What's the difference between encodeURI and encodeURIComponent?
encodeURI leaves URL structure characters (/?#&=) unescaped. Use it for full URLs. encodeURIComponent escapes everything. Use it for individual query values or path pieces that might contain those characters.
What does URL.canParse() do?
URL.canParse() (ES2024) is a static method that returns true if a string is a valid URL. It's faster and cleaner than try/catch around new URL().
Why does my query string have '+' instead of '%20'?
application/x-www-form-urlencoded (the HTML form encoding) uses '+' for space. Query strings created by URLSearchParams also use '+'. Both are valid. Servers decode them the same way.
Is this tool free?
Yes. URL Encoder on Pixlane currently requires no signup for core use; tool-specific limits may apply.