Free tool
JSON Formatter, Validator & Minifier
Validate, pretty-print, sort and minify JSON with clear error messages that show the exact line and column. Runs in your browser, so your data stays private.
Runs entirely in your browser. Nothing you type or upload is sent to our servers.
How to use the JSON formatter
- Paste JSON, or open a file from your computer.
- The tool validates as you type and shows the first error with its line and column.
- Choose Format to make it readable or Minify to compress it, then copy or download the result.
Common JSON mistakes
- Trailing commas after the last item.
- Single quotes instead of double quotes around names and strings.
- Unquoted property names, which JavaScript allows but JSON does not.
- Comments, which JSON does not support.
- Unescaped line breaks inside strings.
Frequently asked questions
Is my JSON sent to a server?
No. Validation and formatting run in your browser. Your data is never uploaded, so it is safe to use with internal or sensitive payloads.
What is the difference between formatting and minifying?
Formatting (pretty-printing) adds indentation and line breaks so people can read it. Minifying removes all unnecessary whitespace so the file is as small as possible for transfer or storage. The data is identical either way.
Why does it say my JSON is invalid when JavaScript accepts it?
JSON is stricter than JavaScript object syntax. Property names and strings need double quotes, trailing commas are not allowed, and comments are not part of the standard. The error message tells you which rule was broken and where.
Why did a long number change?
JavaScript stores numbers as 64-bit floats, so integers above 9,007,199,254,740,991 cannot be represented exactly. The tool warns you when your input contains such numbers. Keep very large IDs as strings.
Link to this tool
Found it useful? Copy a link for your page, newsletter or documentation.
Get new tools and guides by email
Optional. The tool above works without signing up.
More free tools
Browse all developer tools or the full list of free tools.
- Markdown to HTML ConverterConvert Markdown to clean, sanitised HTML with a live preview. Scripts and unsafe links are removed, and nothing leaves your browser.
- HTML Viewer & FormatterPaste HTML to see a safe, sandboxed live preview where scripts never run, then beautify or minify the source. Private: nothing leaves your browser.
- Text Compare & Diff CheckerCompare two texts side by side or inline and see every added, removed and changed line or word. Options to ignore case and whitespace. Nothing is uploaded.
- JSON to CSV & CSV to JSON ConverterConvert JSON to CSV or CSV to JSON with nested-object flattening, any delimiter and correct RFC 4180 quoting. Large files are handled in your browser.
- SEO Meta Tag & Social Preview GeneratorWrite title and description tags with live Google and social-card previews, length guidance, and copy-ready Open Graph and Twitter Card HTML.
- UTM Campaign Link BuilderBuild clean, consistent UTM-tagged campaign links for Google Analytics. Normalises case, keeps existing parameters and warns about common mistakes.