Text Tool
AI Text Cleaner | Keep Formatting, Strip Hidden Junk
Removes non-breaking spaces, curly quotes, and invisible characters from Claude and ChatGPT pastes while keeping bold, links, and headings intact.
URL encoding converts characters that are not allowed in URLs into a percent-encoded format that browsers and servers can safely transmit. The format represents each non-safe character as a percent sign followed by two hexadecimal digits that represent the character’s UTF-8 byte value. The space character, for example, becomes %20 under percent-encoding. Special characters like &, =, and ? that carry structural meaning in URLs must be encoded when they appear as data values inside query parameters.
encodeURIComponent encodes everything except letters, digits, and the characters: – _ . ! ~ * ‘ ( ). It is designed for encoding individual values within query strings or path segments where structural URL characters like ?, &, and / should be escaped because they are data, not URL structure.
encodeURI encodes a complete URL while preserving characters that have structural meaning in a URL. Characters like /, ?, #, and & are not encoded because they are needed to form a valid URL. Use encodeURI when you have a full URL and want to make it safe to transmit, but need to keep its structure intact.
| Character | Encoded (Component) | Encoded (Full URI) | Common Use |
|---|---|---|---|
| Space | %20 | %20 | Words in search queries |
| & | %26 | & (preserved) | Query string separator |
| = | %3D | = (preserved) | Key-value separator |
| # | %23 | # (preserved) | Fragment identifier |
| / | %2F | / (preserved) | Path separator |
| ? | %3F | ? (preserved) | Query string start |
| + | %2B | %2B | Often misread as space |
| @ | %40 | @ (preserved) | Email in URLs |
URL decoding converts percent-encoded sequences back to their original characters. This is useful when reading encoded values from server logs, analytics exports, or API responses where query parameter values appear in their encoded form. Search query data in Google Analytics, for example, stores search terms in the URL as encoded strings. Decoding them makes the actual search terms readable for analysis.
encodeURIComponent encodes everything except unreserved characters (letters, digits, and - _ . ! ~ * ' ( )). It encodes structural URL characters like /, ?, #, and & because it is designed for encoding individual values within a URL, not the URL structure itself. encodeURI encodes a complete URL and deliberately leaves structural characters unencoded so the URL remains valid. Use encodeURIComponent for query parameter values. Use encodeURI only when encoding a full URL for transmission.
The encoding for spaces is the standard defined by RFC 3986 for URI percent-encoding. The + sign as a space representation is a form encoding convention (application/x-www-form-urlencoded) used in HTML form submissions. JavaScript's encodeURIComponent produces for spaces. Some older systems and query string parsers also accept +, but is the correct and universally compatible encoding for spaces in URLs.
A decoding error occurs when the input contains a percent sign followed by characters that are not valid hexadecimal digits, or a lone percent sign at the end of the string. For example, %ZZ is invalid because Z is not a valid hexadecimal character. This often happens when a percent sign appears in text that was not URL-encoded and has been pasted into the decoder as if it were encoded text.
Yes. GA4 and Universal Analytics store UTM parameters and search query data in percent-encoded form in URLs. Pasting a URL from a GA report into this tool and clicking Decode will convert back to spaces, back to &, and other encoded characters back to their original form, making the URL parameters readable for analysis. Use the encodeURIComponent mode (the default) for decoding query string values.