Encode or decode any URL or text - with a live breakdown showing exactly which characters changed and why. Split full URLs into protocol, host, path, and query params. Detects double-encoding before it breaks your links.
What makes it different
Every encoded character is explained. Every URL can be split into its parts. Double-encoding is caught before it breaks something.
Every encoded character is listed with its code and a plain-English explanation - turn %20 from gibberish into "space - not allowed in URLs".
educational, not just functionalPaste any URL and see it broken into protocol, host, port, path, query, and fragment - with each query parameter shown individually.
debug real URLsComponent, Full URI, and Form encoding - switch between them and watch the output change, with the difference explained inline.
learn the differenceSpots %25 sequences that suggest your text was already encoded once - and offers to decode twice with one click.
catches a real, common bugBuild a query string from key-value pairs - every value is encoded automatically as you type. No manual %-encoding needed.
build, don't just convertA collapsible table of common characters and their percent-encoded forms - bookmark this page as your %XX cheat sheet.
cheat sheet includedQuick guide
Three tools in one - encoding, splitting, and building.
Enter any text or URL. The output updates live as you type - no button required for basic encoding.
Use Component/Full URI/Form encoding for simple conversions, the URL Splitter to debug a full link, or the Query Builder to construct one from scratch.
Review the character breakdown to understand what changed, then copy the result - or use it as input for another pass.
A URL can only contain a limited set of characters safely: letters, digits, and a handful of punctuation marks like -, _, ., and ~. Everything else - spaces, accented letters, emoji, and characters that have special meaning in URL syntax like &, =, and ? - must be represented using percent-encoding: a % followed by two hexadecimal digits representing the character's byte value. A space becomes %20, an ampersand becomes %26, and so on.
encodeURIComponent is the right choice almost all the time. It encodes a single value - a query parameter, a path segment - and escapes everything that could be misread as URL structure, including &, =, ?, #, and /. This is essential when the value itself might contain those characters: if a search term is "rock & roll", you need the & encoded to %26 so it isn't mistaken for a parameter separator.
encodeURI is for encoding an entire, already-structured URL. It leaves the structural characters - :, /, ?, &, =, # - untouched, because removing them would break the URL. It only encodes characters like spaces and unicode characters that are definitely not part of the URL's syntax.
?q=... - use encodeURIComponent on each piece individually, then assemble the full URL. Never run encodeURIComponent on a complete URL - it will mangle the :// and ? that make it a valid URL in the first place.
application/x-www-form-urlencoded is what browsers use by default when submitting an HTML <form>. It is nearly identical to encodeURIComponent, with one historical difference: spaces are encoded as + instead of %20. Both are valid and decode to a space, but if you're constructing a request body for an API that expects form encoding, use + for spaces to match what the server expects.
Imagine a URL passes through two systems that both apply encoding. The first system encodes a space to %20. The second system, not knowing the string is already encoded, encodes the % character itself - turning %20 into %2520. When this URL is finally decoded once, it becomes %20 - still not a space. The fix is to decode it a second time. This tool detects %25 sequences (the encoded form of %) and flags the likelihood of double-encoding.
| Mode | Function | Space becomes | Encodes & = ? / # |
|---|---|---|---|
| Component | encodeURIComponent | %20 | Yes - all of them |
| Full URI | encodeURI | %20 | No - preserved as structure |
| Form | x-www-form-urlencoded | + | Yes - like Component |
Encode user search input before adding it to a URL - handle spaces, special characters, and emoji safely.
Debug why an API call fails by splitting the URL and checking each query parameter is correctly encoded.
Build properly encoded share URLs for social media, email links, or deep links into apps.
Use the double-encoding detector to find and fix links that have been encoded one too many times.
Encode non-ASCII characters in domain names, paths, and query strings for international content.
Use the character breakdown and reference table to understand exactly how URL encoding works.
FAQ
Everything about percent-encoding, URL structure, and common pitfalls.
Ask a questionencodeURIComponent encodes a single value intended for one part of a URL - it escapes characters like &, =, ?, and / because they could otherwise be mistaken for URL structure. encodeURI encodes a complete URL and leaves those structural characters untouched so the URL remains valid. Use encodeURIComponent for query parameter values, and encodeURI only when encoding a full URL string.application/x-www-form-urlencoded is the format browsers use when submitting HTML forms via GET or POST. It is similar to standard percent-encoding but represents spaces as + instead of %20. Use this mode if you are constructing a request body or query string for a traditional form submission.%20, and then the % itself gets encoded into %2520. This often happens accidentally when a URL passes through multiple systems that each apply encoding. The result is a URL that decodes incorrectly and may break links or API calls. This tool detects %25 sequences and warns you if double-encoding is likely.% character not followed by two valid hexadecimal digits. This can happen if a literal % character in the original text was never encoded to %25. The tool highlights this in the issue banner above the input.:/?#[]@!$&'()*+,;= - and any character outside the basic ASCII letters, digits, and -_.~ need encoding when used as data rather than structure. The reference table below the tool lists the most common characters and their encoded forms.