Escape special characters for JSON strings or unescape JSON-encoded text. Runs in your browser — your data never leaves your machine.
Automatically escapes all JSON-special characters including double quotes, backslashes, newlines, tabs, carriage returns, backspaces, and form feeds.
Literal double quotes become \" and newlines become \n, making your text safe to embed as a JSON string value without breaking the syntax.
All escaping and unescaping runs locally in your browser using JavaScript. Nothing is sent to a server — safe for sensitive data.
Type or paste plain text in the left panel and the JSON-escaped version appears instantly on the right. Special characters like double quotes, backslashes, and newlines are automatically escaped with backslash sequences. To unescape, paste a JSON-escaped string in the right panel and the original text appears on the left.
The JSON specification requires certain characters to be escaped when they appear inside string values. A backslash (\) serves as the escape character, followed by a specific letter: n for newline, t for tab, r for carriage return, and so on. Double quotes must be escaped as \" since they delimit string boundaries. Without proper escaping, these characters would break the JSON structure and cause parse errors in any JSON consumer.
Escape or unescape XML entities instantly. Handle & < > " and more. Free.
Pretty-print or minify JSON with configurable indentation. Free, runs in your browser.
Validate JSON syntax and see errors with line numbers. Free, runs in your browser.