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.
If Easy24 helped, buy a coffee
Tools stay free. A one-time tip is optional and helps keep them running.
When to use String Escape
String Escape is one of those utilities you open for a few minutes, finish the task, and close without leaving a trail of uploads. Escape or unescape JavaScript, HTML, and SQL strings. Copy the result when you are done; closing the tab clears the in-memory session for that paste. Because String Escape is bilingual on Easy24, the same workflow works in English or Turkish without changing how the tool behaves. Browser-first processing is the privacy default here: there is no Easy24 document inbox waiting to expire after a timeout for this workflow. This page has no daily free-plan cap, so you can run it as often as you need. When you are done, download or copy what you need, then close the tab. Related tools on the page cover common follow-up steps such as the reverse conversion or a neighboring format.
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