Rayrun
← Back to tools

JSON Repairer

A JSON repair tool takes in a JSON string and repairs it, fixing any syntax errors and formatting it properly.

Use Ctrl + k + "Tools" to quickly access all tools.

This tool is capable of resolving the following JSON issues:

  • Quote Issues:

    • Add missing quotes around keys.
    • Replace single quotes with double quotes.
    • Replace special quote characters like “...” with regular double quotes.
  • Escape Characters:

    • Add missing escape characters.
    • Strip escape characters from an escaped string like {"stringified": "content"}.
  • Syntax & Structure:

    • Add missing commas and closing brackets.
    • Strip trailing commas.
    • Strip comments such as /* ... */ and // ....
    • Strip JSONP notation like callback({ ... }).
  • Special Characters & Values:

    • Replace special white space characters with regular spaces.
    • Replace Python constants (None, True, and False) with their respective JSON values (null, true, and false).
    • Strip MongoDB data types like NumberLong(2) and ISODate("2012-12-19T06:01:17.171Z").
  • String Concatenation:

    • Concatenate broken strings like"long text" + "more text on next line".
  • Transformations:

    • Turn newline delimited JSON entries into a valid JSON array. For instance:
      { "id": 1, "name": "John" }
      { "id": 2, "name": "Sarah" }
      will be transformed to:
      [
        { "id": 1, "name": "John" },
        { "id": 2, "name": "Sarah" }
      ]

Feedback or suggestions? Send it to luc@ray.run

Thank you!
Was this helpful?

Open Source Packages

Install with https://npmjs.com/:

  • jsonrepair

Related Tools

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.