JSON Escape / Unescape

Escape quotes, backslashes, and newlines so your text can be safely inserted into JSON, or unescape it.

Why Escape JSON?

JSON relies on double quotes " to establish properties and string values. If you need to include a double quote, a backslash \, newlines, or tabs within that string, you must escape them using backslashes (e.g., \", \\, \n). Failing to strictly encode these elements results in malformed JSON payloads and API errors.

How to Use

  1. Paste text: Paste your multiline string or raw data into the "Input" box.
  2. Action: Click "Escape JSON" to automatically convert line breaks to \n and escape quotes. Click "Unescape JSON" to revert an escaped string literal back to readable text.
  3. Copy: Click "Copy Output". Your text is now ready to be safely dropped directly into a JSON value.