This tool formats, minifies and validates JSON, helping you turn a tangled string of data into something readable, or compress clean JSON down for transport. JSON, short for JavaScript Object Notation, is the lingua franca of data exchange on the web: APIs return it, configuration files are written in it, and applications pass it back and forth constantly. It is designed to be both human and machine readable, but in practice JSON often arrives as one long unbroken line, or riddled with a misplaced comma or bracket that stops it parsing. This formatter fixes both problems. Paste your JSON in, choose to beautify it, and the tool re-indents everything into a clean, nested structure with consistent spacing, so you can actually read and navigate it. Choose minify instead and it strips out all the unnecessary whitespace to produce the most compact valid form, ideal for sending over a network or embedding in code. Either way, it validates as it goes: if the JSON is well formed, you get the formatted result; if not, it tells you that the input is invalid so you know to hunt for the stray comma, missing quote or unbalanced bracket. Everything runs in your browser, so even sensitive payloads stay on your device and are never uploaded. Use it to inspect an API response, to tidy a config file, to debug why a parser is rejecting your data, or to shrink JSON before pasting it somewhere. A reminder on the rules: JSON needs double quotes around keys and strings, no trailing commas, and no comments, which catches many people out.
Validates as it formats. JSON requires double quotes, no trailing commas and no comments. Runs entirely in your browser; nothing is uploaded.
The tool parses your text as JSON. If it parses cleanly, it is valid, and the tool re-serialises it: beautify mode adds line breaks and indentation of two or four spaces, while minify mode removes all optional whitespace for the most compact form. If parsing fails, the input is reported as invalid so you can find the syntax error.
Pasting the compact object with a site name, a tool count, a flag and a list, then choosing beautify with two spaces, lays each property on its own indented line so the structure is clear. Switching to minify collapses it back to a single line with no spaces, the smallest valid form for sending over a network.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
© 2019 to 2026 Calculate.co.nz. All rights reserved.