Fix Malformed JSON Online

A single-pass repair engine for JSON that almost-but-not-quite-parses. Drop in your broken document and get clean, validator-ready JSON back.

Input

Waiting for input
1

Output

1

Instant

Runs entirely in your browser — no upload, no wait.

100% private

Your JSON never leaves the tab. Nothing is logged.

No signup

Free, unlimited, no account required.

What "malformed" usually means

Malformed JSON is structurally close to valid JSON but breaks one of the seven core rules: keys must be double-quoted strings, values must be one of seven types, no trailing commas, no comments, no unescaped control characters, balanced braces and brackets, valid Unicode escapes. The repair engine fixes each of these in a single pass.

Repair pipeline (in order)

1. Strip BOM and zero-width characters at the start of the file. 2. Normalize quotes — convert smart quotes to ASCII, single quotes to double quotes (only outside of string contents). 3. Quote bare keys — `name:` becomes `"name":`. 4. Strip comments — // and /* */ are removed. 5. Remove trailing commas before } and ]. 6. Balance brackets — append missing closers based on the opener stack. 7. Escape control characters inside string values (\t, \n, etc.). 8. Re-parse and pretty-print the result with strict JSON.parse.

When auto-repair refuses to guess

If a string is unterminated halfway through the document, the engine cannot know where the author intended to close it. In that case the tool stops, points at the position, and shows you the surrounding context so you can fix it manually. Better to surface ambiguity than to invent JSON that silently swallows part of your data.

Use cases

API responses scraped from logs, JSON pasted out of email or chat, hand-edited config files, AI-generated payloads, CSV-to-JSON exports with bad escaping, and old .bak files where a colleague left commas behind.

Privacy

Everything runs locally. The repaired JSON, the original input, and any error context never leave your browser.

Related tools

Frequently asked questions