loot.tools

JSON String Escape

Turn raw text into a safe JSON string value by escaping quotes, backslashes, and newlines, or reverse it to get the original text back. Handy when you need to embed JSON inside JSON, paste a string into code, or read an escaped value.
Raw text
Escaped string

What escaping does

JSON strings can't contain raw double quotes, backslashes, or line breaks. Escaping replaces them with safe sequences: a quote becomes backslash-quote, a newline becomes backslash-n, and so on. The result drops cleanly into a JSON value or a string literal in most programming languages without breaking the syntax.

When you need unescape

Sometimes you have an escaped string from a log file, an API response, or a JSON field that itself holds JSON, and you want the readable original. Unescape mode resolves the backslash sequences back into real quotes and line breaks. If the input has a broken escape sequence, it tells you instead of guessing.

Common situations

Embedding a block of JSON inside another JSON string. Pasting multi-line text into a config value. Copying a string out of code without mangling the quotes. Reading a doubly-escaped value from a log. Switch between escape and unescape with the toggle, and nothing leaves your browser.

© 2026 loot.toolsYour data stays in your browser.