Paste text to begin.

What this tool does

The JSON escape tool prepares plain text for safe insertion into JSON strings and also decodes escaped JSON string content back into normal text.

Common use cases

  • Embedding multiline text inside a JSON request body.
  • Escaping quotes and line breaks for test fixtures.
  • Decoding JSON string values copied from logs.
  • Preparing text for config or payload samples.

Before and after example

Before

Hello "team"
Line two

After

"Hello \"team\"\nLine two"

Common JSON errors related to escaped strings

  • Unescaped double quotes inside string values.
  • Broken newline sequences when copying multiline text.
  • Invalid backslash escaping inside quoted JSON strings.
  • Pasting raw text where a JSON string literal is expected.

How to use the tool

  1. Paste plain text into the left panel to create a JSON-safe string.
  2. Click Escape for JSON to generate the escaped version.
  3. Paste a quoted JSON string and click Unescape JSON String to decode it.
  4. Copy the output into your request body, test fixture, or config file.
Privacy note: Runs locally in your browser. Your JSON is not uploaded.

Related JSON tools

FAQ

Does the escaped output include quotes?

Yes. The output is a JSON string literal, including the surrounding quotes.

Can I unescape any random text?

The unescape action expects a valid quoted JSON string. Use escape for raw text.

Why do line breaks become \n?

That is the JSON-safe representation of a newline inside a string literal.

Does this tool upload text or payloads?

No. It runs locally in your browser, so your text is not uploaded.