JSON Repair

Fix broken JSON: trailing commas, single quotes, unquoted keys, comments, truncation and stray Markdown. Returns valid JSON.

Free to try Pay by wallet (x402) json-repair

Example

Input
{
  "json": "{\"name\": \"Test\", \"value\": 42}"
}
Answer
{
  "json": "{\n  \"name\": \"Test\",\n  \"value\": 42\n}",
  "valid": true,
  "parsed": {
    "name": "Test",
    "value": 42
  },
  "fixes_applied": []
}

Try it

Runs the real tool from your browser, with no key. Free calls are limited to 300 a month across all free tools.

Edit the values, then run.

Inputs

FieldTypeRequiredWhat it is
jsonstringYesBroken JSON string to repair

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
jsonstringAlways (present in every successful answer)
validbooleanAlways (present in every successful answer)
parsedobjectAlways (present in every successful answer)
fixes_appliedarrayAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Free tool: works without a key, within a monthly allowance. Add your key for more.
curl -X POST https://api.strale.io/v1/do \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "json-repair",
    "inputs": {
      "json": "{\"name\": \"Test\", \"value\": 42}"
    },
    "max_price_cents": 5
  }'

Limitations

  • Severely malformed JSON may not be recoverable

    Repairs common JSON errors (trailing commas, unquoted keys, single quotes) — severely malformed input may not be recoverable

    What to do instead: If repair fails, extract valid JSON segments manually and reconstruct the intended structure.