Escape text with quotes and newlines for JavaScript
Input
Hello "World"!
Next LineExample output
Hello \"World\"!\nNext LineEscape raw text into source code string literals, or unescape escaped strings back to plain text. Supports JavaScript, TypeScript, Python, C/C++, Java, C#, SQL single-quote doubling, CSV quotes, and regex metacharacters with 100% client-side privacy.
| Supported Dialects | JavaScript, TypeScript, Python, C/C++, Java, C#, SQL, CSV, Regex |
|---|---|
| Escape Sequences | \n, \r, \t, \b, \f, \v, \0, \", \', \\, \xHH, \uHHHH, \u{...} |
| Maximum Input | 5 MB |
| Execution Deadline | 2 s |
Input
Hello "World"!
Next LineExample output
Hello \"World\"!\nNext LineInput
Hello \"World\"!\nNext LineExample output
Hello "World"!
Next LineStandard ANSI SQL escapes single quotes by doubling them ('') rather than using backslashes. The SQL dialect accurately doubles single quotes and supports optional string delimiter wrapping.
The unescape parser supports both fixed 4-digit \uXXXX sequences, ES6 bracketed \u{1F680} variable-length code points, and 8-digit \U0001F680 sequences without corrupting surrogate pairs.
If a string ends with an isolated dangling backslash that has no following character to escape, the executor detects it and preserves the backslash while raising a descriptive warning diagnostic.
JSON Escape & Unescape
Escape raw text and JSON strings for programming literals, or unescape escaped strings back to readable text.
HTML Entities Encoder & Decoder
Encode reserved HTML characters and symbols into named or numeric HTML entities, and decode entities back to plain text.
XML Entities Encoder & Decoder
Encode and decode the 5 predefined XML entities (&, <, >, ", ') and numeric character references.
ASCII & Unicode Code Point Converter
Convert text characters into ASCII/Unicode code points, hex, decimal, or escape sequences, and translate code points back to text.
JSON Escape strictly adheres to RFC 8259 JSON grammar (only double quotes, no \v or \' or \x escapes). String Escape supports multi-language semantics including single quotes, Python/C escapes, SQL doubling, and regex character escaping.
Programming languages use quotes to demarcate string boundaries and special characters for newlines and tabs. Escaping allows embedding quotes and control codes directly into source code strings without causing syntax errors.
No. All escaping, unescaping, and diagnostics run 100% client-side inside your browser.