URL Encoder / Decoder
Encode text into percent-encoded URL format, or decode an already-encoded URL back to readable text. Supports both full-URI and component encoding modes.
Input Text or URL
Result
Enter text or a URL to encode/decode
Disclaimer: This tool runs entirely in your browser — no data is sent to any server. Always verify encoded URLs work as expected in your target application before deploying to production.
About the URL Encoder / Decoder
URL encoding (also called percent-encoding) converts characters that aren’t allowed in a URL — like spaces, ampersands, and special symbols — into a %XX format safe for transmission over the web.
Component vs. Full URI Encoding
Component encoding (encodeURIComponent) escapes nearly all special characters, making it ideal for encoding individual query parameter values. Full URI encoding (encodeURI) preserves structural characters like : / ? # & = so it’s safe to use on an entire URL without breaking its structure.
Common Use Cases
URL encoding is essential when passing user-generated text (like search queries or form data) as part of a URL, ensuring spaces, quotes, and other special characters don’t break the link or introduce security issues.
Worked Example
Take the text name=Ravi & Sons/café?. In Component mode the result is name%3DRavi%20%26%20Sons%2Fcaf%C3%A9%3F, because every reserved character is escaped. In Full URI mode the same text gives name=Ravi%20&%20Sons/caf%C3%A9?, where =, &, / and ? stay as they were. Only the space and the accented letter changed.
A whole address behaves differently. https://example.com/search?q=chai latte&lang=en in Full URI mode becomes https://example.com/search?q=chai%20latte&lang=en (47 characters grow to 49), which is still a working link. In Component mode it turns into https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dchai%20latte%26lang%3Den, which no longer works as an address.
Common Mistakes
- Using Component mode on a whole URL. The colons and slashes are escaped and the link breaks. Use it for single values only.
- Using Full URI mode on a value that contains & or =. A customer name such as “Ravi & Sons” would split into two query parameters.
- Encoding twice. A space becomes
%20, then%2520. Decode once to check what you really have. - Expecting + to decode to a space. The decoder leaves
+as a plus sign; only%20becomes a space. - Decoding a stray percent sign. Text such as
100%triggers the malformed percent-encoding message.
Where You Would Use This
- Building a query string by hand for a search or filter link.
- Reading a tracking or redirect link full of
%2Fand%3Dto see its real destination. - Preparing a message for a share link such as a WhatsApp or email pre-filled body.
- Debugging why a parameter with non-English text arrives garbled on the server.
Tips for Reliable Results
Encode each piece separately and then assemble the address. For example, encode the value of each parameter in Component mode, then join the parts with the ampersands and equals signs yourself. After encoding, compare the length figures: if the encoded text is the same length as the original, nothing needed escaping. When decoding a long link, do it in stages, because a link can be encoded more than once by different services. If the decoder reports a malformed sequence, look for a percent sign that is not followed by two hexadecimal characters, which usually means the text was truncated or only partly encoded. Non-English letters and symbols are encoded as several percent groups, so one character such as the rupee sign turns into nine characters (%E2%82%B9), and the length figures will grow by more than you might guess. Keep that in mind when a system limits the length of a link or a parameter.