JsonMend

Fix broken JSON from LLM output

Paste what your model returned and get valid JSON back, with every fix listed and an optional JSON Schema check.

Fix my JSONGet a free API keyAPI docs · MCP
curl -X POST 'https://jsonmend.mike-tusa.workers.dev/api/v1/repair' \
  -H 'content-type: text/plain' \
  --data-binary "{name: 'Ada', tags: [1,2,],}"

It handles code fences, prose around the JSON, trailing commas, single quotes, unquoted keys, comments, Python True/None, and truncated arrays and objects.

Paste your JSON

Validate against a JSON Schema (optional)

Free API key

No key is needed to try it (about 10 requests per minute and 30 per day per IP). A free key gives about 30 per minute and 1,000 requests per month.

Shown once; we keep only a hash.
curl -X POST 'https://jsonmend.mike-tusa.workers.dev/api/v1/repair' -H 'content-type: text/plain' --data-binary @broken.json
curl -X POST 'https://jsonmend.mike-tusa.workers.dev/api/v1/repair' -H 'content-type: application/json' \
  -H 'Authorization: Bearer jm_...' -d '{"input":"{name: \u0027Ada\u0027, tags: [1,2,],}"}'

For AI agents (MCP)

JsonMend is also a remote Model Context Protocol (MCP) server with two read-only tools, repair_json and validate_json. Most MCP clients accept this config; some use a different format (for example, VS Code uses a servers key). Clients with a settings screen just need the URL https://jsonmend.mike-tusa.workers.dev/mcp.

{
  "mcpServers": {
    "jsonmend": {
      "type": "http",
      "url": "https://jsonmend.mike-tusa.workers.dev/mcp"
    }
  }
}

Same limits and optional free API key as the JSON API (send it as X-API-Key or Authorization: Bearer). Machine-readable docs: llms.txt · OpenAPI 3.1 spec · API docs

Privacy

The JSON you paste is processed in memory to produce the response and is not stored or logged by JsonMend. JsonMend never fetches anything: no URLs are opened, and remote schema $refs are not followed. Rate limits keep a counter keyed by a salted hash of your IP address (kept up to 2 days). For a free API key we store only a hash of the key, a salted hash of the network it was requested from (so all keys from one network share a monthly quota), and, if you give one, a salted hash of your email address. To count daily unique visitors we store, for one UTC day (deleted after 9 days), only a salted one-way hash of your network and the date; no IP address, browser details or pasted content. The service runs on Cloudflare Workers.