Repair JSON and review the proposed data
JSON Repair proposes fixes for malformed JSON text, then shows the original, the proposal and their text differences. It is free, requires no ToolMint account and runs locally in your browser. Paste text or choose one UTF-8 JSON, JSON Lines or text file. The tool can add missing quotes or commas, remove trailing commas and comments, and handle some copied or incomplete JSON. It cannot recover information that was never present or determine what an API intended.
Use repair when a response, configuration excerpt or generated draft has syntax mistakes. If the input is already valid, the tool says so and makes no syntax repair. For strict formatting without inferred fixes, use JSON Formatter. These tools have different jobs: the formatter rejects malformed input; repair offers a proposal that needs your review.
How to repair a JSON document
- Paste text into JSON to repair, or choose a UTF-8 file. The file is read locally and is not uploaded.
- Select Repair JSON. Processing starts explicitly, in a local worker. Cancel, an input edit or Reset stops pending work.
- Read Review findings and compare the original with Proposed JSON. Check values and structure, not just whether the result looks tidy.
- Inspect Repair changes. Download the review report when you need the complete comparison or an audit trail outside the tab.
- Choose preserve-layout, formatted or minified output. Repaired data requires the review checkbox before copy, download or Use proposal as input becomes available.
- Validate the accepted result against its source system and, where available, a schema. A JSON syntax check does not establish that the document is correct for your application.
Editing the source clears its old proposal, comparison, review acceptance and exports immediately. A result from cancelled work cannot replace the edited input. Use proposal as input is an explicit action; repair never overwrites your original automatically.
Supported repairs and their boundaries
The local jsonrepair parser supplies the proposed syntax changes. ToolMint then checks strict JSON syntax, duplicate member names, decoded Unicode and number-token preservation before allowing export.
| Input issue | Possible proposal | What to review |
|---|---|---|
| Unquoted keys or single-quoted strings | Add or replace quotes | Whether the text represents the intended key or string |
| Missing commas or trailing commas | Insert or remove separators | Whether values still belong to the intended object or array |
| Comments or Markdown code fences | Remove non-JSON wrapping text | Any information carried only by a comment |
Python-style True, False or None |
Use JSON literals | Whether the replacement value is appropriate |
| A missing value or unfinished structure | Insert a placeholder or closing syntax in supported cases | The data may still be incomplete even when syntax is valid |
| JSON Lines containing multiple values | Wrap values in one JSON array | The output is an array, rather than a stream of separate documents |
| Recognized callback or data-type wrappers | Remove wrapping notation without running it | A wrapper can carry meaning that ordinary JSON does not express |
Support is limited to the parser's recognized patterns. This is not a JavaScript or Python interpreter, a general JSON5 converter, or a guarantee to repair every malformed document. Unsupported text shows an error; it is never executed.
Worked example: quotes, constants and separators
Select Load example to start with this fictional input:
{request_id: 9007199254740993, name: 'Sample', active: True, items: [1, 2,],}
The proposal gives member names and the string value JSON-compatible quotes, changes True to true, and removes trailing commas. In formatted layout it reads:
{
"request_id": 9007199254740993,
"name": "Sample",
"active": true,
"items": [
1,
2
]
}
The original stays available. Review acceptance is required because the tool changed the text. The proposal preserves the large number token; it does not pass the complete document through JavaScript object parsing and serialization to produce the export.
Duplicate keys remain a conflict
Select Duplicate keys example:
{status: 'pending', status: 'paid'}
The proposal retains both members and identifies the duplicate name and its proposal location. Copy, JSON download and reuse as input stay blocked. The tool does not choose which status is correct, rename a field or discard a value. Edit the original according to the originating API or application and repair again.
Names are compared after JSON escape decoding within each object. "status" and "\u0073tatus" conflict in the same object. Matching is case-sensitive and applies separately to each object; the same field name in two different records is ordinary JSON. The findings list shows the first 20 duplicate occurrences, while export checks all occurrences within the document limits.
Incomplete JSON is not recovered data
Select Incomplete value example to inspect {"status":"pending","total":}. The parser can propose null for the missing value. A finding calls attention to additional null values, and the text comparison shows the insertion. null is not a recovered total, a zero amount or proof that no total exists.
Likewise, closing a truncated string or array can make a fragment syntactically valid without restoring the missing records. Check the upstream response, generation process or file export. Re-fetching a complete source is preferable when the missing information matters. Findings are diagnostics, not a complete semantic audit; every repaired proposal needs review even when no specific ambiguity was classified.
Preserve number text and validate Unicode
Preserve-layout, formatted and minified output keep the proposed numeric token spelling, including large integers, trailing decimal zeros, exponent notation and negative zero. A separate check blocks export if recognized source number tokens disappear or change. Syntax repair can still interpret malformed or quoted text, so review the original numbers and their types.
Text preservation is not arbitrary-precision arithmetic. A downstream JavaScript consumer can round a bare integer outside its safe range or convert an extreme exponent to a non-finite value. Use the representation required by the API contract; turning an already rounded value into a string cannot recover lost digits. This tool does not convert IDs to strings automatically.
Valid Arabic, other Unicode text and emoji are retained. An unpaired UTF-16 surrogate in the input, or an unpaired surrogate produced by decoding a JSON string or key escape, blocks repair/export. UTF-8 files with invalid byte sequences are rejected rather than decoded with replacement characters.
Understand the change comparison
For inputs and proposals up to 131,072 code units and 2,000 lines each, the comparison marks added, removed and unchanged lines. CRLF, CR and LF are treated as line separators. For larger comparisons it matches the common beginning and ending, then shows one changed region; that region can contain unchanged text between edits. This is a bounded text comparison, not a JSON structure or meaning comparison.
The on-page preview shows up to 200 rows and 4,000 characters per row. The original and proposal panes retain their full text. Download review report includes the complete source, proposed repair before optional formatting, findings and comparison. It can be downloaded for a blocked proposal so you can investigate it; that does not approve the proposal for use.
Limits, cancellation and local processing
| Limit | Implemented behavior |
|---|---|
| Input text | Up to 262,144 UTF-16 code units |
| Local file | One UTF-8 file up to 1,048,576 bytes; decoded text must also meet the text limit |
| Proposed/output text | Up to 1,048,576 UTF-16 code units per supported layout |
| Nesting and values | Up to 100 nesting levels and 100,000 JSON values |
| Worker duration | Processing is stopped after 10 seconds; original input remains available |
| Browser support | Modern browsers with module workers, file reading and text decoding; clipboard/download behavior depends on browser permissions |
Code units are not UTF-8 bytes or user-perceived characters. A typical emoji uses two UTF-16 code units; combinations can use more. An oversized pasted input remains editable so you can shorten it or reset. If formatted whitespace exceeds the output limit, preserve-layout and minified output remain available where the other checks pass.
The limits bound workload; they do not promise a particular processing time on every device. Worker failure or a timeout shows an error with the source retained. Reduce size or nesting and retry. Use an appropriate local development tool for larger or unusually complex documents.
Privacy and the next validation step
Inputs, imported file contents, proposed output and comparisons stay in current-tab memory. This tool does not upload them or autosave them in local storage. The interactive area is masked for session recording. Existing consent-aware tool events contain only fixed tool, action, example and result/format information; they exclude input text, member names, filenames and output contents.
Copies, downloaded JSON and review reports retain their data outside the tab. A report includes the original, so review it before sharing. Reset clears the draft, proposal, comparison and acceptance, returns to preserve-layout mode and stops pending work; it cannot erase clipboard history or downloaded files.
After accepting the syntax repair, use JSON Schema Validator for required fields and types, JSONPath Tester to inspect selected values, or Text Diff Checker for a separate line comparison. ToolMint's Developer tools and pretty-printing JSON guide explain related workflows. Check each destination's privacy notes before pasting sensitive data: local processing and autosave policies differ between tools.
Sources
Technical behavior reviewed October 14, 2026:
- jsonrepair: recognized repair patterns and API, ISC-licensed parser; this tool pins version 3.15.0.
- RFC 8259: JSON syntax, duplicate object names, numbers and Unicode.
- ECMAScript JSON.parse for JavaScript parsing behavior.
The visible FAQ below describes the implemented workflow and shares its questions and answers with the page's structured data.