MergeJSON

JSON Escape.

Escape any text into a JSON-safe string — quotes, backslashes, newlines, tabs, and control characters handled, with optional \u Unicode escaping. Instant and 100% private, in your browser.

No signup · No uploads · Need the reverse? Use JSON Unescape

Escaped JSON string

// Paste input and press “Escape”.

JSON escape online - escape a string for JSON

A JSON escape tool turns raw text into a JSON-safe string. Paste text above to escape quotes, backslashes, newlines, tabs, and control characters so the value can be embedded safely inside JSON, JavaScript, logs, config files, or database fields.

Escape JSON characters correctly

Hand-editing escapes is easy to get wrong, especially when the text contains both backslashes and quotes. This JSON string escape tool follows JSON string rules and can optionally wrap the result in quotes or convert Unicode characters to \uXXXX escapes.

Why use this JSON escape tool?

It is instant, private, and handles the details a parser expects. Need the reverse operation? Use JSON Unescape, or read how to escape a JSON string.

FAQ

JSON escape, answered.

How do I escape a JSON string online? +

Paste raw text into the JSON Escape tool and it will return a JSON-safe string. It escapes quotes, backslashes, newlines, tabs, carriage returns, and control characters so the text can be embedded safely in JSON.

What characters need to be escaped in JSON? +

Double quotes, backslashes, newlines, tabs, carriage returns, and control characters must be escaped inside JSON strings. For example, a quote becomes \" and a newline becomes \n.

Can I wrap the escaped output in quotes? +

Yes. You can choose whether the output is escaped content only or a complete quoted JSON string value. Use quoted output when you need a standalone valid JSON string.

Can it escape Unicode as \uXXXX? +

Yes. The tool can optionally escape non-ASCII characters as \uXXXX sequences. Direct UTF-8 is usually best for modern APIs, but Unicode escaping can help with older systems and ASCII-only logs.

What is the difference between JSON escape and JSON stringify? +

JSON escape focuses on making text safe inside a JSON string. JSON.stringify is the JavaScript API that performs JSON-safe string escaping and can also serialize full objects and arrays.

Is my text uploaded when I escape it? +

No. The JSON escape tool runs entirely in your browser. Your text is never uploaded, stored, logged, or sent to a server.