Escape JSON
Convert JSON safely in your browser. Choose a complete JSON value or a quoted string literal so escaping rules and errors match the data you are handling.
A QUICK WALKTHROUGH
How to use this tool
- Choose Escape JSON or Unescape JSON, then select JSON value or JSON string literal.
- Paste valid input and submit to validate the exact syntax and escape sequences.
- Review the result, then copy it or download a JSON file.
Values and literals are different inputs
JSON value mode accepts an object, array, string, number, boolean, or null and validates the complete document. JSON string literal mode requires one JSON quoted string, such as "hello\nworld"; it rejects objects and unquoted text so the boundary stays explicit.
Visible JSON error boundaries
Malformed JSON, trailing commas, unescaped control characters, invalid escape sequences, and extra content are rejected with the browser parser message. Processing, copying, and download preparation happen locally without a backend.
GOOD TO KNOW
Common questions
What is a JSON string literal?
It is one quoted JSON string including its surrounding double quotes, for example "hello\nworld". A plain sentence without quotes is not a JSON string literal.
Can value mode handle arrays and numbers?
Yes. It accepts every JSON root type, including objects, arrays, strings, numbers, booleans, and null.
Does this upload my JSON?
No. Parsing and conversion run in your browser.