Escape text for JSON

Input
Output

Escape Text for a JSON String

Make any text safe to put inside a JSON string: a log line, a message, an HTML snippet or a file path. A quote becomes \", a new line \n, a tab \t and a backslash \\. Unescape turns an escaped string back into plain text.

How do I use the Escape text for JSON?

  1. Paste the text into the input box.
  2. Keep characters like ₹ é 😀 as they are, or write them as \uXXXX codes.
  3. Copy the escaped string. To go back, switch to Unescape and paste it.

What does the Escape text for JSON do?

  • Escapes quotes, backslashes, new lines, tabs and control characters
  • Optional \uXXXX codes when the target only accepts ASCII (₹ becomes \u20b9)
  • Unescape works with or without the outer quotes
  • Says when the input is JSON rather than an escaped string

Frequently asked questions

How is this different from JSON Stringify?
Stringify takes JSON and turns it into one string. Escape text takes any text, JSON or not, and makes it safe to put inside a JSON string.
Is my data uploaded?
No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.

More JSON tools

Bracely has more than 65 JSON tools in one page. Related ones:

Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut. About · Privacy policy
Last updated · Version 2.0 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram