JSON Escape / Unescape

Escape a string for embedding in JSON, or unescape a JSON string literal back to raw text. Runs entirely in your browser.

About this tool

Escaping wraps your text in double quotes and escapes characters like quotes, backslashes, and newlines so it can be embedded as a JSON string value. Unescaping does the reverse: paste a JSON string literal (including its surrounding quotes) to get the raw text back. Both use the browser's native JSON.stringify/JSON.parse.

Share on LinkedInShare on X
Link to this tool

Copy this HTML to cite this tool from your own site or article.

About JSON Escape / Unescape

JSON Escape / Unescape escapes raw text strings for safe embedding inside JSON string literals or unescapes JSON escaped strings back to plain text.

How to use JSON Escape / Unescape

  1. Paste plain raw text or JSON escaped string content.
  2. Choose operation mode: Escape or Unescape.
  3. Click Process to apply JSON string literal escape rules.
  4. Copy escaped or unescaped string result.

Examples

Raw Input: Line 1 "Line 2" Escaped Output: "Line 1\n\"Line 2\""

FAQ

Which characters are escaped by JSON string rules?

Double quotes ("), backslashes (\), and control characters like newlines (\n) and tabs (\t) are escaped.

Does unescaping handle unicode escape sequences?

Yes. Unicode sequences like \u0026 unescape correctly.