Repair

Paste messy JSON; Pandia fixes it.

What it fixes

Repair handles the common ways JSON arrives broken:

  • Trailing commas after the last element or property.
  • Unquoted keys — bare identifiers used as object keys.
  • Single quotes around strings instead of double quotes.
  • Comments — both // line and /* */ block.
  • Non-JSON literalsNaN, Infinity and undefined become null.
  • BOM and CRLF — byte-order marks and Windows line endings.
  • JSONP / parenthesis wrappers — strips the callback or paren wrapping.
  • Missing brackets and unterminated strings — closes what was left open.
  • Bad escape sequences inside strings.

When it runs

Pandia's parser is strict by design. If your input fails the strict parser, run Repair to coerce it into valid JSON, then open it as normal.

Example

Before — malformed input, with a comment, a single-quoted string, an unquoted key, and a trailing comma:

{
  // user record
  name: 'Ada',
  "score": NaN,
}

After — clean, valid JSON:

{
  "name": "Ada",
  "score": null
}

Next steps

Once the document is valid, read it in any of the five views or check it against a schema with Validate.

Related — the JSON repair tool.