Converter Portal
Developer Tools

JSON Escape / Unescape

Escape text into a JSON string literal, or unescape a JSON string back to text.

Embedding text inside JSON means escaping it: quotes become \", backslashes double, and newlines turn into \n. Getting this right by hand is fiddly and error-prone, especially with multi-line content or text that already contains escape sequences — one missed backslash and the JSON won't parse.

This tool escapes any text into a valid JSON string literal (with surrounding quotes), and unescapes a JSON string back into raw text. Paste a log line, a code snippet or a paragraph and get a value you can drop straight into a JSON field.

How to use JSON Escape / Unescape

  1. 1

    Choose a direction

    Escape raw text, or unescape a JSON string.

  2. 2

    Paste your input

    Multi-line content is fully supported.

  3. 3

    Copy the result

    Escaped output includes the surrounding quotes.

Features

  • Handles quotes, backslashes, newlines, tabs and control characters
  • Unescape mode reverses any valid JSON string
  • Preserves Unicode characters

Frequently asked questions

Common mistakes to avoid

  • Double-escaping already-escaped text, turning \n into \\n.
  • Forgetting to strip the wrapping quotes when embedding the value somewhere that adds its own.
Written by Converter Portal Editorial TeamPublished July 23, 2026Last updated July 23, 2026

Get new tools in your inbox

One email a month with new tools, guides, and updates. No spam, unsubscribe anytime.