Practical example
Escape a message containing quotes, backslashes, tabs, and a newline before placing it inside a JSON string literal.
Paste plain text to escape it for a JSON string, or paste escaped JSON string content to decode sequences such as \n, \t, \", \\, and \uXXXX.
A JSON Escape / Unescape tool converts plain text into JSON-safe string content and decodes escaped JSON string sequences back into readable text.
It is useful when building API payloads, debugging logs, embedding strings in JSON config, or checking how quotes, backslashes, newlines, tabs, and Unicode escapes are represented.
Learn the workflow behind this tool and what to check next.
Escaping makes a string syntactically valid for JSON, but the surrounding context still determines whether it is safe and correct.
Use JSON escaping for JSON strings only; HTML, JavaScript, URLs, SQL, and shell commands each need their own rules.
Check whether your framework already escapes output before adding extra backslashes or quote escaping manually.
Review newlines, tabs, quotes, backslashes, Unicode, and invisible characters when moving text between systems.
Paste the escaped value into the actual parser, config file, or API payload before shipping copied output.
Escape a message containing quotes, backslashes, tabs, and a newline before placing it inside a JSON string literal.
JSON escaping does not make a value safe for HTML, JavaScript, SQL, or a shell; each destination has different rules.
I escape at the final output boundary and keep the underlying value unescaped internally to avoid double escaping.
You may also find these tools useful.