Text Escape / Unescape
Escape text for a target language's string literal syntax.
Loading tool…
About this tool
Escapes text for a specific destination — a JavaScript string, a SQL literal, a CSV field, a shell argument or a regular expression — each of which has different rules.
Questions
- Is SQL escaping a defence against injection?
- No. Use parameterised queries. Escaping a literal by hand is for one-off scripts and fixtures, not for application code.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.