Developer tool

JSON Escape / Unescape

Escape text for a JSON string value, or turn escaped JSON string text back into readable text.

Escape text for JSON strings

JSON strings need quotes, line breaks, backslashes, and control characters escaped before they can be pasted safely into a JSON value. Paste regular text, escape it, and copy the result.

The unescape action accepts escaped content such as Line one\nLine two or a full quoted JSON string literal.

Practical examples

  • Escape a multiline message before adding it to a JSON request body.
  • Unescape a logged JSON string so quotes and line breaks are readable.
  • Check whether copied escaped text is a valid JSON string value.

Related JSON tools

After escaping a string, paste it into the JSON Validator with the rest of your payload. Use the JSON Formatter for readable objects, or the JSON Repair Tool when copied JSON has common syntax issues.

FAQ

Does the escaped result include outer quotes?

No. The output is the escaped string content, ready to paste between JSON string quotes.

Can I unescape a quoted JSON string?

Yes. The unescape action accepts either escaped content or a full quoted JSON string literal.

Is the text uploaded?

No. Escaping and unescaping run locally in your browser.

What characters are escaped?

Quotes, backslashes, line breaks, tabs, and other control characters are escaped using the browser JSON parser rules.

Why does unescape show an error?

The input must be valid escaped JSON string content. A stray backslash or unfinished escape sequence cannot be decoded safely.