Fix invalid JSON
JSON Repair
Paste broken JSON and fix it in one click. Trailing commas, single quotes, comments, unquoted keys, missing brackets and Python-style values are turned into valid JSON.
Select a node to see its pathThe beautified JSON and tree appear here as soon as your input is valid.
Drop to open
.json, .txt and other text files
How it works
How to use the JSON Repair
- 01
Paste the broken JSON. Errors are highlighted straight away.
- 02
Press Fix JSON. The repaired text replaces the original so you can review it.
- 03
Use Undo (⌘/Ctrl + Z) if you want to go back, or Format to beautify the result.
FAQ
Frequently asked questions
What kinds of problems can be repaired?
Trailing and missing commas, single or curly quotes, unquoted keys, JavaScript and Python comments, Python True/False/None, unclosed brackets and strings, JSONP wrappers, and newline-delimited JSON.
Can repair guess wrong?
Repair follows predictable rules, but heavily broken input can be ambiguous. Always review the result. Undo restores the original text.
Where does broken JSON usually come from?
Hand-edited config files, JavaScript objects copied from source code, log lines, LLM output and truncated API responses are the most common sources.
Is my JSON uploaded to a server?
No. All parsing, formatting and validation happens in your browser with JavaScript. Nothing you paste or open is sent to us or stored on a server. Share links keep the JSON inside the URL fragment (after the #), which browsers never send to servers.
Tools
More JSON tools
JSON Viewer
Free online JSON viewer, formatter and validator. Paste or upload JSON to beautify it, explore it as a tree and find syntax errors by line. 100% private.
JSON Formatter
Pretty-print JSON instantly with 2-space, 4-space or tab indentation, optional key sorting and syntax highlighting. Free online JSON beautifier, no upload.
JSON Validator
Validate JSON as you type. Errors are flagged on the exact line and column with a plain-English explanation and a one-click fix. Free and private.
JSON Tree Viewer
Explore JSON as a collapsible tree with type badges, item counts, search and click-to-copy JSONPath. Handles large files smoothly. Free online tool.
JSON Minifier
Minify JSON by stripping whitespace and line breaks to shrink payloads. See the size saved instantly. Free, private online JSON compressor.