Skip to content

JSON String Escape

Escape text for use inside a JSON string: quotes, backslashes, newlines and control characters, optionally ASCII-only.

Runs in your browserText → JSON string
Loading tool…

Example

Input
Line 1
Say "hi"	C:\path
Output
Line 1\nSay \"hi\"\tC:\\path

How to use the JSON String Escape

  1. Paste or type your Text into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the JSON string result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.

Frequently asked questions

Which characters must be escaped in JSON?

Double quotes, backslashes and control characters below U+0020 (such as newlines and tabs). Everything else, including emoji, may appear as-is in UTF-8 JSON.

Browse all escape & unescape →