Skip to content
Fourohtwo

agent402.tools/api/json-repair

Repair broken JSON text and list its fixes with their line, column and offset (the first 200 in full; fixCount and fixKinds count all): trailing and extra commas, single or typographic quotes, unquoted keys, // and /* */ comments, missing closing brackets, unclosed strings, raw line breaks inside.

BasePolygonArbitrumMonadAvalancheSei+5Unchecked
POSThttps://agent402.tools/api/json-repair

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agent402.tools/api/json-repair", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"json":"{name: 'Ada', tags: [\"eng\", \"math\",], // note\n score: NaN"}),
});
console.log(await res.json());

Example input

{
  "json": "{name: 'Ada', tags: [\"eng\", \"math\",], // note\n score: NaN"
}

More from JSON repair