Free tool
JSON formatter and validator
Paste JSON, make it readable or compact, and see exactly where an error is, by line and column. Everything stays in your browser.
- Input
- 0 bytes
- Result
- –
- Keys
- –
- Depth
- –
Runs entirely in your browser: what you enter is not sent to us or stored.
How to use the JSON formatter
This JSON formatter makes JSON readable or compact and shows exactly where any syntax error is. Paste your JSON into the left-hand pane and choose Format. The tool first checks whether the text is valid JSON and then lays it out neatly, indented with two or four spaces or a tab. Minify does the opposite: it strips all unnecessary spaces and line breaks, leaving a compact version for a configuration file, a test request or an environment variable.
Turn on Sort keys alphabetically if you want to compare two API responses. Objects are then sorted by key name at every level, while the order within arrays stays the same, because in JSON that order does carry meaning. Below the result you see how large the JSON is, how many keys it contains and how deeply the structure is nested. That is handy for checking quickly whether a response is complete or unexpectedly large.
Copy puts the result on your clipboard and Download gives you a .json file. Everything happens in your browser. That makes the tool suitable for data you want to handle carefully, such as an API response with customer data or a configuration with internal addresses.
Validating JSON: finding errors by line and column
A JSON validator should not only tell you that something is wrong, but also where. When an API or import rejects a file, you often get nothing more than a vague message like "Unexpected token". This tool locates the error itself and shows the line number, the column and the text around it, with the line highlighted in the input pane. Go to the error moves your cursor straight to the right spot.
Most errors arise because JSON looks like JavaScript but is stricter. Keys must always be in double quotes, single quotes are not allowed, and there must be no comma after the last element of an object or array. Comments with // or /* */ do not exist in JSON either, nor do undefined, NaN or the Python spellings True and None. When the tool recognises such a pattern, it adds a concrete tip.
An error is not always exactly where it is reported. If a comma or closing bracket is missing, the parser only notices at the next character. So look at the line above as well. That is why the fragment in the error message shows two lines before the error.
What is JSON and why does formatting matter?
JSON (JavaScript Object Notation) is the standard format systems use to exchange data. Almost every modern API, from your webshop and accounting software to a CRM or payment provider, sends and receives JSON. The format has only a few building blocks: objects with keys and values, arrays, strings, numbers, true, false and null. Precisely because it is so simple, every programming language can work with it.
To a computer, formatting makes no difference: minified and neatly indented JSON mean exactly the same thing. To people the difference is huge. An API response on one long line is unreadable, while a formatted version shows the structure at a glance: which fields there are, what a list contains and where a value is missing. You use minify when file size matters, for example with large volumes of traffic or limited storage.
Be careful with very large numbers. JSON itself has no limit, but browsers and JavaScript calculate accurately with numbers of up to about 16 digits. An ID or account number with more digits can therefore come back slightly different after formatting. Systems that exchange such values usually send them as strings for that reason.
From loose JSON to a reliable integration
A formatter is ideal for inspecting an API response or checking a configuration. If you find yourself regularly copying JSON from one system, editing it and pasting it into another, that is a sign a proper integration would save time and errors. A good integration validates the data automatically against a schema, catches errors before they reach your records and logs what went wrong.
When designing such an integration you look at more than the format alone: which fields are required, how to handle missing values, what happens when a system is temporarily unavailable and how to prevent an order from being processed twice. Those are exactly the points where manual copying and pasting goes wrong sooner or later.
Frequently asked questions
JSON formatter & validator: your questions answered
Is my JSON sent to a server?
No. Formatting, minifying and validating happen entirely in your browser with JavaScript. Nothing goes over the internet and nothing is stored, so you can also use the tool for API responses containing personal data.
What is the difference between formatting and minifying?
Formatting puts each value on its own line with indentation, so the structure is easy to read. Minifying removes all spaces and line breaks that are not needed. The content stays exactly the same in both cases; only the layout changes.
Why do I get an error for a comma after the last element?
JavaScript and many programming languages allow a comma after the last element, but the JSON standard does not. Remove that trailing comma and the JSON is valid. The tool recognises this mistake and gives a tip.
Can I validate JSON with comments?
No, JSON has no comments. Files with // or /* */, such as some editor configuration files, use a variant like JSONC or JSON5. Remove the comments to turn it into valid JSON.
Does sorting the keys change my data?
The values stay the same; only the order of keys within objects changes. According to the standard, that order does not matter in JSON. Arrays are not sorted, because their order does carry meaning.
How large can my JSON be?
There is no hard limit; the tool uses your own device's memory. Files of a few megabytes are usually no problem. At tens of megabytes, formatting can take a moment and the input pane becomes slow.
Free tools
More free tools
AI readiness scan
Answer ten questions about one process and see straight away whether AI, rule-based automation or something else is the right first step.
Savings calculator
Enter how much time your team spends on manual work and get an instant estimate of the savings per year.
Cron expression generator
Build a schedule or paste a cron expression and read in plain English when it runs, with the next run times.
CSV to JSON converter
Turn a CSV export from Excel, your webshop or your accounting software into JSON for an API or import. The delimiter is detected automatically.
Custom software or SaaS
Compare the cost of an off-the-shelf package with custom software over several years, using your own numbers.
Dutch VAT calculator
Convert an amount from excluding to including Dutch VAT or back, at 21%, 9% or 0%, and see exactly how much VAT it contains.
Margin calculator
Enter two of cost price, selling price, margin or markup and get the rest, including the difference between margin and markup and the price with VAT.
EAN checker
Check whether an EAN-13, EAN-8, UPC-A or GTIN-14 is valid, calculate a missing check digit, and validate a whole list in one go.
Reorder point calculator
Work out the stock level at which to reorder, how much safety stock you need and what a sensible order quantity is.

Free introductory call
Curious what Kantex could automate for you?
Book a free 30-minute introductory call. We walk through your process and show where software, integrations or AI deliver the most.
- No obligation and no sales pitch
- Concrete opportunities for your process
- A clear next step and quote


