Escape text for a JSON string, or unescape an escaped string back to the original text
"Escape" converts your input into a form that is safe inside a JSON string ("→\", \→\\, newline→\n, tab→\t, etc.). The output is the inner content without the surrounding double quotes. "Unescape" does the reverse. Internally it uses JSON.stringify / JSON.parse, so the conversion follows the spec exactly.
When enabled during escaping, every non-ASCII character (Japanese, emoji, etc.) is converted to a \uXXXX unicode escape. This helps when pasting into legacy ASCII-only systems or avoiding mojibake. When disabled, non-ASCII characters are kept as-is.
Unescaping requires the input to follow valid JSON string escape rules. If it contains a broken escape (for example a trailing lone \), an error is shown. Check that your \ and " characters are balanced.
Converting special characters such as double quotes, backslashes, newlines, and tabs into forms safe inside a JSON string. It is used when embedding code or logs as a JSON value.
Yes. All processing runs entirely in your browser (JavaScript); your input is never sent to a server.
Yes. By default they are kept as-is. Enabling "Escape non-ASCII to \uXXXX" converts every non-ASCII character to \uXXXX form.