Your string broke the thing you pasted it into
A quote, an ampersand, or a newline quietly breaks JSON, an HTML attribute, or a SQL statement. Manually doubling quotes or adding backslashes is exactly the kind of fiddly work that introduces the bug you are trying to avoid. Let a tool do the escaping consistently.
Escape for the right target
The Escape / Unescape tool handles JavaScript, JSON, HTML, SQL, and CSV. Pick the format that matches where the string is going, paste it in, and copy the escaped version that will not break the parser. The reverse direction turns escaped text back into something readable.
Validate the JSON after escaping
If you are building a JSON payload, escape first and then confirm the whole thing parses with the JSON Formatter & Validator. Escaping a value is only half the job; the surrounding structure still has to be valid.
Common cases
- Embedding user input in an HTML attribute without breaking markup.
- Quoting values safely inside a SQL string literal.
- Building CSV rows where commas and quotes would otherwise shift columns.
Everything runs locally, so the strings you process — which may be sensitive — never leave your browser.