format · validate · convert · runs locally

JSON Escape & Unescape

Escape a raw string into a JSON string literal (quotes, newlines, tabs, unicode), or switch to Unescape to turn a JSON string literal back into its raw value.

Frequently asked questions

When do I need to escape a string for JSON?

When embedding text that contains quotes, backslashes, or newlines inside a JSON string value or a code literal.

What does unescape do?

It parses a JSON string literal (with its surrounding quotes) back to the raw characters.