Turn text into a safe string for JSON, JavaScript, SQL, CSV, a shell command, a regular expression or \u escapes, or turn an escaped string back into plain text.
Escaped by this page:
| For | It’s "here"\n |
|---|---|
| JSON string | It's \"here\"\n |
| JavaScript | It\'s \"here\"\n |
| Regular expression | It's "here" |
| CSV field | "It's ""here"" |
| SQL string | 'It''s "here" |
| Shell argument | 'It'\''s "here" |
| XML text | It's "here" |
| Unicode escapes (\u) | It's "here" |
So quotes, backslashes and line breaks inside it don’t end the string early or change the code around it: the usual cause of broken JSON and SQL injection.
Use your database library’s parameters (placeholders) instead; escaping is for one-off queries and quick fixes.
Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.