JSON Repair

Fix invalid or malformed JSON automatically

Input JSON

Repaired JSON

Auto:
Indent:

Repair actions performed

Logs will appear here...

About JSON Repair

This tool is inspired by josdejong/jsonrepair and uses the jsonrepair library with additional custom repair logic.

It can automatically fix common JSON syntax errors:

  • Missing quotes around keys
  • Single quotes instead of double quotes
  • Trailing commas in arrays and objects
  • JavaScript-style comments
  • Unquoted string values
  • Missing commas between elements
  • Stray quotes in keys
  • Missing closing brackets and braces
  • JavaScript concatenated strings
  • Hexadecimal numbers
  • JavaScript special values (NaN, Infinity)
  • Unescaped newlines in strings
  • Python constants (None, True, False)
  • JSONP notation (callback functions)
  • Fenced code blocks (\`\`\`json ... \`\`\`)
  • Ellipsis in arrays and objects ([...])
  • MongoDB data types (NumberLong, ISODate)
  • Special whitespace and quote characters
  • Newline delimited JSON (NDJSON)
  • Double-escaped JSON strings
  • Markdown code blocks with language specifiers
  • JSON with non-JSON prefix text