What is the JSON Escape?
JSON strings cannot contain raw double quotes, backslashes or line breaks. The JSON Escape tool converts them into the right escape sequences (\", \\, \n, \t and so on) so you can paste multi-line text, HTML, code or file paths into a JSON value without breaking it.
Choose whether to wrap the result in quotes, and optionally write every non-ASCII character as a \u escape for systems that only accept plain ASCII. Escaping follows exactly the same rules as JSON.stringify.
How to use it
- Type or paste the text you want to put in JSON.
- Choose Wrap in quotes if you are writing a complete JSON value.
- Turn on ASCII only if the receiving system needs \u escapes for accented letters, Indian scripts or emoji.
- Copy the escaped string.
Example
He said "hi" Path: C:\Users\nova
"He said \"hi\"\nPath: C:\\Users\\nova"
Features
- Standard escaping. Uses the same rules as JSON.stringify, so the result always parses.
- Multi-line text. Line breaks, tabs and other control characters become \n, \t and \u escapes.
- Quotes optional. Get a complete JSON string, or just the inside to paste between existing quotes.
- ASCII-only mode. Writes é, ₹, नमस्ते and emoji as \u escapes for strict systems.
- Round trip. Send the result to JSON Unescape to check it turns back into the original text.
Frequently asked questions
Which characters need escaping in JSON?
Double quotes (\"), backslashes (\\) and control characters such as line breaks (\n), carriage returns (\r) and tabs (\t). Everything else, including emoji and Indian scripts, is allowed as-is in UTF-8 JSON.
Do I need to escape forward slashes?
No. \/ is allowed but not required. It is sometimes used to stop “</script>” from closing an HTML script tag when JSON is embedded in a page.
What is the ASCII only option for?
Some older systems and log formats only handle plain ASCII. With ASCII only, every other character is written as a \uXXXX escape (emoji take two), which any JSON parser turns back into the original text.
Is my text uploaded?
No. Escaping happens in your browser.
Last updated · Free, no sign-up, runs in your browser.