# datatool.dev > datatool.dev is a small suite of tools that make AI model output safe to use. Its > core is a deterministic JSON repair engine — exposed as an in-browser tool, an HTTP > API, and an npm package — that fixes the malformed JSON large language models > commonly emit, plus guides on verifying AI answers. datatool.dev is a static site with no accounts, no tracking, and no database. The in-browser tool and the `/api/repair` HTTP endpoint share one JSON repair engine; the `@datatool/json-heal` npm package mirrors that same engine logic in its own repo, kept in sync by hand rather than a shared package dependency. It is deliberately conservative: it only applies repairs that are provably safe and refuses to guess on genuinely ambiguous input, returning an error rather than silently producing semantically wrong JSON. What the engine fixes: markdown/code fences, surrounding prose around a single JSON value, smart/curly quotes, single-quoted strings, unquoted object keys, Python literals (True→true, False→false, None/undefined→null), `//` and `/* */` comments, missing commas between values, and unclosed brackets/braces. What it intentionally refuses (returns an error, never a guess): trailing commas; input that ends with no complete value left to close — right after a comma or colon (e.g. `{"a": [1, 2,`), on an object key with no value yet (e.g. `{"a":1,"b"`), mid-string with no closing quote (e.g. `{"a": "hello`), or mid-literal (e.g. `{"a":tru`, not yet `true`); multiple separate top-level values; unknown barewords; and otherwise deeply broken structure. Missing closing brackets/braces are still repaired whenever the last value present is already complete, however deeply nested (e.g. `{"user":{"name":"Ada"` is fixed) — only an incomplete trailing token is refused, for the same reason as a trailing comma: completing it would mean inventing the missing data. A `"safe": true` result guarantees the output is valid JSON faithful to the input — not a best-effort guess. ## For AI agents — programmatic use - [JSON Repair API](https://datatool.dev/api/repair): `POST` only, `Content-Type: application/json`. Body: `{"input": ""}`. Success → `200 {"output": "", "safe": true}`. Errors are typed JSON `{"error": "", "message": "..."}`, never an HTML page or a 500 stack — `400` malformed envelope / non-string `input` / empty input / genuinely unrepairable JSON; `413` body > 256 KB; `422` `input` string > 200 KB; `429` rate-limited (honor the `Retry-After` header); `405` non-POST. A `400` with `"error": "unrepairable"` also carries a `"category"` field — `truncated`, `missing_value`, `ambiguous`, or `other` — classifying why the input couldn't be safely repaired; the `invalid_input` error (malformed envelope, non-string/empty `input`) never has one. Free keyless tier: 500 requests/month + 30/minute per IP. Zero retention — payloads processed in memory and discarded; only metadata is logged. No API key needed. - [@datatool/json-heal (npm)](https://www.npmjs.com/package/@datatool/json-heal): the same engine as a package, for ad hoc/local use — no network call. Run with `npx @datatool/json-heal ''`, or import `repair()` in JS/TS. Not intended for production-scale or pipeline use; for that, use the API above. Higher-volume paid API keys for production use are coming soon; until then, the keyless free tier above is the supported path for programmatic/pipeline use. Example API call: curl -X POST https://datatool.dev/api/repair \ -H "Content-Type: application/json" \ -d '{"input": "{name: \"Greg\", active: True}"}' # → {"output":"{\n \"name\": \"Greg\",\n \"active\": true\n}","safe":true} ## Tools & guides - [JSON repair tool (home)](https://datatool.dev/): paste broken JSON from an AI tool, get valid pretty JSON. Runs entirely in the browser. - [JSON Repair](https://datatool.dev/json-repair): the repair tool plus a description of every pattern it fixes, with examples. - [Fix JSON From AI](https://datatool.dev/fix-json-from-ai): practical guide to fixing broken JSON from tools like ChatGPT and Claude. - [How It Works](https://datatool.dev/how-it-works): the deterministic single-pass engine and the benchmark loop behind it; every number is auditable. ## Verifying AI output - [Verify AI Answers](https://datatool.dev/verify-ai-answers): how to verify AI answers before relying on them in real work. - [Why AI Hallucinates](https://datatool.dev/why-ai-hallucinates): why models hallucinate and how to reduce the risk. ## Optional - [AI Fact Checker](https://datatool.dev/fact-checker): a preview of an upcoming fact-checking system (verdict, confidence, scrutiny). Not yet a working API.