SEOlust logo SEOlust
Developer & Utilities

JSON Escape / Unescape

Escape text into a safe JSON string, or unescape a JSON string back to plain text — quotes, tabs, and newlines handled both ways. Runs in your browser. Free.

All tools

💡 How to use

  • Escape turns raw text into a safe JSON string — quotes, backslashes, tabs, and newlines are escaped.
  • Unescape turns a JSON string literal back into the original text.
  • Runs in your browser — nothing is uploaded.

Free JSON Escape / Unescape Tool

Escape text into a safe JSON string, or unescape a JSON string back to plain text. Quotes, backslashes, tabs, newlines, and Unicode are handled correctly, in both directions, with one-click copy. Runs entirely in your browser. Free, no sign-up.

What does escaping JSON mean?

JSON strings must follow strict rules: certain characters — double quotes, backslashes, tabs, newlines, and other control characters — cannot appear literally and must be written with a backslash escape. Escaping takes raw text and converts those characters into their safe form (for example a newline becomes \n and a quote becomes \"), so the text can be dropped into a JSON value without breaking it.

Escape vs unescape

The tool works both ways:

  • Escape — turn raw text into a JSON-safe string, ready to paste into a JSON file or code.
  • Unescape — take an escaped JSON string and recover the original text, with real newlines and quotes.
  • Wrap-in-quotes option — include or omit the surrounding double quotes when escaping.
  • Swap — flip the input and output to reverse a conversion instantly.

How to use the JSON escape tool

It is instant:

  • Choose Escape or Unescape.
  • Paste your text or JSON string.
  • The result updates live and can be copied.
  • Use Swap to send the output back as new input.

Which characters get escaped

Standard JSON escaping covers the double quote, the backslash, and control characters: newline, carriage return, tab, backspace, and form feed each get a two-character backslash sequence, and other control characters become \u00XX Unicode escapes. Regular letters, digits, spaces, and most symbols — including emoji — are left as-is, since valid JSON is UTF-8 and does not require escaping them.

Common uses

Escaping JSON comes up whenever text has to live inside a JSON string:

  • Embedding a block of text, HTML, or code into a JSON config or API payload.
  • Fixing a value that breaks your JSON because of an unescaped quote.
  • Reading a log or API response where the message is an escaped string.
  • Preparing multi-line content to store in a single JSON field.

Pro tip

If your whole document is JSON rather than a single string, format and validate it with a JSON formatter first, then use this tool only for the specific string value you need to escape or read. To pretty-print or validate full JSON, see our JSON Formatter.

FAQ

Is this JSON escape tool free and private?
Yes. It is free and runs entirely in your browser, so nothing you paste is uploaded or stored.
What is the difference between escaping and unescaping JSON?
Escaping converts raw text into a valid JSON string by backslash-escaping special characters. Unescaping reverses that, turning an escaped JSON string back into the original readable text.
Which characters does JSON escaping change?
Double quotes and backslashes, plus control characters like newline (\n), tab (\t), and carriage return (\r). Other control characters become \u escapes. Normal text and emoji are left as-is.
Can I escape without the surrounding quotes?
Yes. Use the 'Wrap in double quotes' option to include or exclude the surrounding quotes, depending on whether you are pasting into an existing string or a new one.
Why does my JSON string fail to unescape?
It usually means the input is not a valid JSON string — for example an unmatched quote or an invalid escape sequence. Fix the offending character and it will unescape correctly.
Does it handle newlines and tabs correctly?
Yes. Real newlines and tabs are converted to \n and \t when escaping, and back to real characters when unescaping.
Is this the same as a JSON formatter?
No. A formatter pretty-prints and validates a whole JSON document. This tool escapes or unescapes a single string value, which is a different task.

Related tools

Pro tip: pair this tool with Upside Down Text Generator and Text Similarity Checker for a faster SEO workflow.