AUTOESCAPE / JSON
JSON String Escape
Escape quotes, backslashes and line breaks for a JSON string.
HTML escape / unescape
Turn reserved characters into HTML entities, or bring them back.
Ready when you are. Conversion happens as you type.
JSON strings: keep quotes and new lines in order.
A JSON string has its own rules. It is wrapped in double quotes, and certain characters inside it need backslash escapes. A literal line break, for instance, becomes \n. A double quote inside the message becomes \".
This tool works on one string. It does not format, validate or repair a complete JSON object. If you paste a whole document in Escape mode, the entire document is treated as text and turned into a string.
A message with a quote, a new line and a file path
She said "hello". Folder: C:\notes
"She said \"hello\".\nFolder: C:\\notes"
Leave Include outer JSON quotes checked when you want a complete JSON string value. Turn it off when you only need escaped content for a string you are assembling elsewhere. Check your surrounding code before pasting: adding another pair of quotes around a result that already has them can break the value.
Decoding a string
Unescape accepts a quoted JSON string or escaped string content without its surrounding quotes. It parses valid JSON string syntax rather than guessing what a backslash probably meant.
If you see an error, check for a stray quote, an incomplete backslash escape or a raw line break inside the encoded string. Do not remove all backslashes to make the error disappear. Some of those backslashes may be protecting characters you want to preserve.
Unicode does not have to look complicated
Ordinary Unicode text, including Urdu and emoji, can remain readable in JSON. This tool uses the browser’s JSON serializer rather than forcing every non-ASCII character into a Unicode escape. The character and byte counters may show different numbers; that is normal for many languages and emoji.