URL Encoder / Decoder
Encode or decode URL strings for safe web transport — the core encoding/decoding is confirmed accurate for both modes. Two previously-confirmed gaps in the URL Analysis breakdown are now fixed: a bare domain or path without an explicit protocol (example.com/page) is now analyzed by assuming https://, clearly labeled as assumed, and repeated query parameters with the same name (?tag=red&tag=blue) now show every value instead of only the last one.
How to Use This Tool
Enter a URL or text in the input area.
Enter a URL or text in the input area.
View the encoded, decoded, component-encoded, and component-decoded versions
all four are always shown together regardless of the Encode/Decode mode toggle, confirmed via testing, since the toggle mainly clears the input and updates the label text.
Pro Tip
Use encodeURIComponent-style encoding (the "Component Encoded" row) for individual query parameter values, but never run it on an entire URL at once — that would also encode the essential structural characters like :// and the path slashes, breaking the URL instead of making it safe. The URL Analysis feature now handles protocol-less input and repeated query parameters correctly on its own — just glance at the "(assumed)" label to confirm whether the protocol shown was actually in your original text.
About This Tool
When to Use
- Encoding a search query containing spaces and special characters before appending it to a URL's query string.
- Debugging why a URL parameter is getting cut off early because of an unencoded ampersand or equals sign.
- Decoding a URL pulled from server access logs to read the human-readable version of an encoded request
Key Details
A URL encoder and decoder converts text to and from percent-encoding (RFC 3986), turning characters like spaces, ampersands, and question marks into their %XX hexadecimal escape sequences so they surv...
Worked example
Encoding 'hello world & more' produces two different results depending on which row you read, and both are correct for their purpose: "Standard Encoded" (encodeURI) gives hello%20world%20&%20more — the space becomes %20, but the & is left alone because encodeURI treats it as meaningful URL structure. "Component Encoded" (encodeURIComponent) gives hello%20world%20%26%20more — here the & is also escaped, because this mode assumes the whole string is a single value going inside a query parameter, where an unescaped & would be misread as a separator between two different parameters. Analyzing example.com/search?tag=red&tag=blue&tag=green (no protocol) now returns Protocol: https (assumed), Host: example.com, and Query: tag = red, blue, green — all three repeated values shown, not just the last.
Interpreting your result
Two visibly different "encoded" results for the same input (Standard vs. Component) is expected and correct, not a sign of an inconsistency — they answer different questions (encode a whole URL vs. encode one value going inside a URL). The URL Analysis card now appears even for protocol-less input, with an "(assumed)" label next to the Protocol field whenever https:// was added automatically rather than typed by you. If a query parameter name appears in your input more than once, the breakdown now lists every value for that key in order, not just the last one — both previously-confirmed gaps are fixed.
URL Encoder / Decoder FAQ
What is URL encoding?
URL encoding (percent encoding) converts characters that are not allowed in URLs into a format that can be safely transmitted. Characters like spaces, symbols, and non-ASCII characters are replaced with a % followed by their two-digit hex code.
What is the difference between encodeURI and encodeURIComponent?
encodeURI() encodes a complete URL while preserving characters that are part of the URL syntax (:/?#[]@!$&'()*+,;=) — this is the tool's "Standard Encoded" row. encodeURIComponent() encodes everything except a smaller set of safe characters, including & and = — this is the "Component Encoded" row, used for encoding a single query parameter value. The two rows will differ for any input containing URL-structural characters like &, =, or ?, confirmed via testing.
What is the difference between URL encoding and HTML encoding?
URL encoding (percent encoding) uses %XX format for URLs. HTML encoding uses entity names or numbers (&, <, ©) for HTML content. They serve different purposes: URL encoding for web addresses, HTML encoding for displaying characters in web pages.
When should I use URL encoding?
URL encoding is required when: including user input in a URL's query string, building API requests with special characters in parameters, encoding non-ASCII characters for URLs, and ensuring mailto: links with subjects/bodies work correctly.
Does the URL Analysis breakdown work on any text, and does it handle repeated query parameters correctly?
Yes to both, now. If your input lacks an explicit protocol (example.com/path or www.example.com instead of https://example.com/path), the analysis automatically assumes https:// and analyzes it — the Protocol field is labeled "(assumed — no protocol was in your input)" so you know that part wasn't in your original text. And if your query string repeats the same parameter name more than once (?tag=red&tag=blue&tag=green), the analysis now shows every value for that key (tag: ["red", "blue", "green"]) instead of only the last one.
Why do some APIs use + instead of %20 for spaces?
The + character for spaces is part of the 'application/x-www-form-urlencoded' format used in HTML form submissions — not the RFC 3986 URL standard. RFC 3986 uses %20 for spaces in URLs. Most modern APIs prefer %20 via encodeURIComponent(), while HTML form data traditionally uses +. This tool uses the RFC 3986 standard (%20), confirmed via testing on both the Standard and Component encoding modes.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team · Based on RFC 3986 — Uniform Resource Identifier and MDN Web Docs — encodeURI()