Repair broken JSON

$0.003 per call · failed calls are never charged · no account or API key needed

Fix JSON as LLMs often write it: removes ```json fences and surrounding prose, comments and trailing commas, converts single quotes, quotes bare keys, maps True/False/None, and closes unclosed brackets. Returns the repaired JSON and whether it now parses. Use when an LLM's JSON output fails to parse.

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Inputs

NameTypeDescription
text (required)stringThe broken JSON text

Request

Over HTTP, with a card key from /credits:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/json/repair?text=%60%60%60json%0A%7Bname%3A%20'Ada'%2C%20tags%3A%20%5B'x'%2C%5D%2C%7D%0A%60%60%60"

Or one of your 25 free calls, no key:

curl "https://agent-data-tools.revmesh2074.workers.dev/json/repair?text=%60%60%60json%0A%7Bname%3A%20'Ada'%2C%20tags%3A%20%5B'x'%2C%5D%2C%7D%0A%60%60%60&trial=1"

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.

Example result

{
  "repaired": "{\"name\":\"Ada\",\"tags\":[\"x\"]}",
  "valid": true
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is json_repair, and the first 25 successful calls are free:

https://agent-data-tools.revmesh2074.workers.dev/mcp

Related tools