Input

Mode:

Output

Formatted result will be displayed here

What is a JSON escape tool?

A JSON escape tool rewrites a raw string so it is safe to drop between double quotes in a JSON document. It escapes the characters JSON treats as special — double quotes, backslashes, and control characters like newline, carriage return, and tab — using backslash sequences. EasyRead does the escape client-side, which is handy when you need to paste a log line, SQL query, or HTML blob into a JSON payload without breaking the parser.

Use Cases

Building request bodies by hand

Escape a multi-line SQL statement or code snippet before pasting it into the body of a JSON API request in Postman or curl.

Embedding JSON literals in code

Prepare a string for inclusion inside a JavaScript, Python, or Go source file as a quoted JSON literal without breaking the source.

Flattening logs into JSON

Convert a multi-line log excerpt into a single JSON-safe string so it can be shipped through a logging pipeline or stored in a column.

Shipping test fixtures

Pre-escape sample inputs for unit tests that load JSON fixtures so you do not have to hand-count backslashes.

FAQ

Which characters get escaped?

Double quote ("), backslash (\\), forward slash when needed, and the control characters newline (\\n), carriage return (\\r), tab (\\t), backspace (\\b), and form feed (\\f).

How is JSON escape different from URL encoding?

JSON escape uses backslash sequences for a JSON parser; URL encoding uses percent-hex for a URL parser. They are not interchangeable.

Can I reverse the output?

Yes. Paste the escaped string into the JSON Unescape tool to get the original characters back.

Do non-ASCII characters get escaped?

Standard JSON allows literal non-ASCII characters. If a system requires ASCII-only, you can switch to \\uXXXX escapes for every non-ASCII code point.

Does it handle multi-line input?

Yes. Every newline becomes \\n, every tab becomes \\t, and the whole input collapses into a single JSON-safe string.