String Escape
Escape or unescape JavaScript, HTML, and SQL strings. The result updates as you type.
How it works
Pick a mode
Choose JS escape, JS unescape, HTML escape, HTML unescape, or SQL escape. A matching sample loads automatically so you can see the effect right away.
Paste or edit the input
Drop raw text, an already escaped snippet, or HTML with tags. The output updates as you type.
Copy the output
Click Copy next to the Output label. If the input cannot be unescaped (malformed JS string), an error message appears instead.
What is string escaping?
String escaping marks characters that would otherwise break the surrounding context — ending a string literal, starting HTML markup, or corrupting a SQL query. JavaScript uses backslash sequences, HTML uses named or numeric entities, and SQL traditionally doubles apostrophes. This tool applies those rules entirely in the browser so your code snippets never leave your device.
Why use this tool
- JS escape — backslash-encodes quotes, newlines, and control chars (JSON rules)
- JS unescape — decodes \n, \", \t and other sequences back to real characters
- HTML escape / unescape — & < > " ' and reverse
- SQL escape — doubles single quotes for safe SQL literals
- Mode-specific sample. Copy in one click. No daily cap
Questions
What does String Escape do?
It encodes or decodes strings for JavaScript, HTML, or SQL. Escaping turns special characters into safe sequences; unescaping reverses that.
What does JS escape change?
It follows JSON string rules: double quotes become \", backslashes become \\, and control characters like newline become \n. The result does not include surrounding quotes.
Why did JS unescape show an error?
The input must be a valid JSON string body — the same text you would put between the quotes in JSON. If it contains unescaped double-quotes or invalid sequences, the parser fails.
What HTML characters are escaped?
& → &, < → <, > → >, " → ", and ' → '. Unescape reverses these five entities.
What does SQL escape do?
It doubles every single quote (apostrophe) in the text — the standard way to embed a string safely inside a SQL single-quoted literal.
Is my text sent to a server?
No. All escaping runs locally in this tab. Nothing is uploaded.
Is there a daily limit?
No. There is no usage cap on this tool.
If Easy24 helped, buy a coffee
Tools stay free in your browser. One-time thanks via Kreosus. Turkish cards work.
Similar Text tools
See allWord Counter
Text
Count words, characters, sentences, and paragraphs instantly. Reading time, speaking time, and case conversion.
OpenLorem Ipsum
Text
Generate placeholder paragraphs for layouts and mockups. Set paragraph and word counts, then copy.
OpenLine Tools
Text
Sort, deduplicate, reverse, shuffle, and trim lines. Seven operations on any list.
Open