JSON Formatter & Validator Online
Loading editor...
What it does
Paste JSON and format it, minify it, validate it, or explore it as a tree. All of that runs in the page, so a 10 MB payload is handled by your machine and never uploaded.
Validation is instant rather than on-demand: the error and its line number appear as you type. That is usually enough to spot a trailing comma or an unquoted key without reading the whole document.
More detail
The parts that do use a server
Two buttons leave your browser, and both are things you have to click.
Fix with AI sends the broken JSON you pasted to a language model, which returns a repaired version. It is for the cases a parser cannot resolve on its own: a truncated response, mismatched brackets, smart quotes pasted from a document. Do not use it on anything containing secrets, because the text goes to a third-party model provider.
Share uploads the current contents and gives you a link. Anyone with that link can read it, so treat it as public. Instant API does the same and additionally serves the payload from a URL you can call.
Formatting options
- Indent size of 2 or 4, and tabs or spaces.
- Sort keys alphabetically, which makes two versions of the same object diffable by eye.
- Minify strips all insignificant whitespace, which is what you want before embedding JSON in something else.
Focus mode
The editor takes the whole viewport by default and collapses the site chrome, because that is the useful shape for the job. Press Escape or use the exit control to bring the rest of the page back. Ctrl+Shift+F toggles it, and Ctrl+Enter formats.
Questions
Is my JSON uploaded when I format or validate it?
No. Parsing, formatting, validating and the tree view all run in your browser. Nothing is transmitted unless you click Fix with AI, Share, or Instant API.
Is there a size limit?
No hard limit, but the browser's memory is a real one. Multi-megabyte documents work; very large ones will make the editor sluggish before they fail outright, because syntax highlighting and the tree view both need the whole structure in memory.
What does Fix with AI actually send?
The text currently in the editor, to a third-party model provider, which returns a corrected version. Because that content leaves your machine, do not use it on JSON containing credentials, tokens or personal data.
Why does my valid JSON show an error?
Most often invisible characters pasted from elsewhere: a non-breaking space, a smart quote instead of a straight one, or a BOM at the start of the file. The error's line number is the place to look, and Fix with AI handles these cases well.