ParseJSON LogoParseJSON

JSON Escape

Convert raw text with special characters into a properly JSON-escaped string. Use this when embedding text inside a JSON string value.

What Gets Escaped?

JSON strings must escape certain characters with a backslash:

  • \" — double quote
  • \\ — backslash
  • \/ — forward slash (optional but valid)
  • \n — newline
  • \r — carriage return
  • \t — tab
  • \uXXXX — Unicode code points

When Do You Need This?

Common cases: storing file paths on Windows (C:\Users\name), embedding HTML or SQL inside JSON, storing multi-line text in a JSON string, or constructing JSON by hand that includes double quotes in values.

Related