String Escape

Enter text and escape for use in JavaScript/JSON (backslash, quotes, newlines) or unescape already-escaped text.

Escape / Unescape

How it works

Escape: we replace \\ \" \n \r \t and non-printable with \\uXXXX. Unescape: we parse the string as a JSON string.

When to use it

Use when building code or JSON strings programmatically or when decoding escaped output.

Frequently asked questions

Which format?

JavaScript/JSON style. Same as JSON.stringify(string) for escape.