JSON Escape Unescape

Escape or unescape a JSON string, handling quotes, backslashes, and newlines correctly — free and processed entirely in your browser.

About JSON Escape & Unescape

Embedding a block of text or code inside a JSON string means every quote, backslash, and line break needs to be escaped first, or the JSON becomes invalid — tedious and easy to get wrong by hand. This tool does it correctly in one step, in either direction.

Escape mode wraps and escapes raw text into a valid JSON string value; unescape mode reverses it, turning an escaped JSON string back into readable text. Everything runs locally in your browser.

How to Escape or Unescape a JSON String

  1. Step 1

    Paste your text

    Paste raw text to escape, or an escaped JSON string to unescape.

  2. Step 2

    Choose a direction

    Switch between Escape and Unescape mode.

  3. Step 3

    Copy the result

    Copy the converted string, ready to paste into your code or JSON file.

Frequently Asked Questions

What characters get escaped?

Double quotes, backslashes, newlines, tabs, and other control characters — everything JSON requires for a string to remain valid.

What's the difference between this and your JSON Formatter tool?

JSON Formatter works with complete JSON documents — validating, prettifying, minifying. This works on a single string value, converting raw text into an escaped JSON string or back — a different, more specific task.

Can I escape multi-line text?

Yes — line breaks convert to the \n escape sequence automatically.

Is my text uploaded anywhere?

No. Escaping and unescaping both happen entirely in your browser.

Related Tools