# JSON Repair Preview

- Human page: https://happytails.ai/en/developer-tools/json-repair-preview/
- Markdown: https://happytails.ai/en/developer-tools/json-repair-preview.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/json-repair-preview/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `json-repair-preview` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Propose bounded JSON syntax repairs locally and show an explicit diff.

### Inputs and settings

Text input: JSON.

Example or placeholder shown in the interface (not a validated fixture):

```text
{"name":"Ada","count":2}
```

Use double-quoted property names and valid JSON values. Up to 200,000 characters. Review the settings before running.

No additional settings are declared for this tool.

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Input is limited to 200000 characters. Results are computed locally and exported as JSON.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "json-repair-preview",
  "category": "developer-tools",
  "built": true,
  "requirements": "Input is limited to 200000 characters. Results are computed locally and exported as JSON.",
  "implementation": {
    "fields": [],
    "inputMaxLength": 200000,
    "inputErrorCode": "STRUCTURED_TEXT_TOO_LONG",
    "registrationFamily": "json-repair-preview",
    "note": "Propose bounded JSON syntax repairs locally and show an explicit diff.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 200000,
      "inputMode": "text",
      "label": "JSON",
      "placeholder": "{\"name\":\"Ada\",\"count\":2}",
      "help": "Use double-quoted property names and valid JSON values. Up to 200,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Preview bounded JSON syntax repairs with an explicit diff. Your data stays local and the repaired text is parsed before it is marked valid.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use JSON Repair Preview

1. Paste the JSON-like text.
2. Run the repair preview.
3. Review the line diff and download the report.

## Useful next steps

- [JSON Canonicalizer](https://happytails.ai/en/developer-tools/json-canonicalizer/) ([Markdown](https://happytails.ai/en/developer-tools/json-canonicalizer.md))

- [JSON validator](https://happytails.ai/en/developer-tools/json-validator/) ([Markdown](https://happytails.ai/en/developer-tools/json-validator.md))

## What it repairs

The preview handles a BOM, common single-quoted strings, unquoted object keys and trailing commas. It does not execute code or invent missing data.
