Escape and unescape strings online for JSON, HTML, JavaScript, URL, CSV and SQL. This free tool handles backslash escaping, escape sequences for newline, tab and quotes, HTML entities, URL percent-encoding, and SQL injection prevention. Paste any string to instantly see the escaped or unescaped result. Supports Unicode \uXXXX notation, special characters, and all common escape formats. All processing happens client-side in your browser — nothing is uploaded to a server.
| Sequence | Character | Description |
|---|---|---|
| \\ | \ | Backslash |
| \" | " | Double quote |
| \' | ' | Single quote |
| \n | ↵ | Newline (line feed) |
| \r | Carriage return | |
| \t | → | Horizontal tab |
| \b | Backspace | |
| \f | Form feed | |
| \0 | Null character | |
| \uXXXX | Unicode code point (hex) |
\" to avoid prematurely ending the string. Without proper escaping, special characters like quotes, backslashes, newlines, and tabs would break parsers, cause syntax errors, or create security vulnerabilities such as SQL injection and XSS attacks.
\"), backslash (\\), newline (\n), tab (\t), carriage return (\r), form feed (\f), backspace (\b), and any Unicode control character using \uXXXX notation. JavaScript's JSON.stringify() handles this automatically. This tool performs the same escaping entirely in your browser.
< becomes <) so they display as visible text in web pages instead of being interpreted as markup. URL encoding (percent-encoding) converts characters to %XX format (e.g., a space becomes %20) so they can be safely included in URLs. They serve different purposes and are not interchangeable — HTML encoding prevents markup injection in pages, while URL encoding ensures characters are transmitted correctly in URLs.
\n with a newline, \t with a tab, \" with a double quote, \\ with a single backslash, and \uXXXX with the corresponding Unicode character. This tool handles all standard escape sequences automatically. In JavaScript, JSON.parse() can unescape JSON-style escaped strings when the input is wrapped in double quotes.