Help desk 24/7 · Office 9 AM–5 PM MT, Mon–Fri

JSON formatter and validator

Indent, minify, sort and check JSON, with errors reported by line and column.

Open this tool

Checking access…

About this tool

Paste JSON and get it back correctly indented, minified onto one line, or with every object key sorted alphabetically so two documents can be compared. When the JSON is broken you get the line and column of the problem plus the likely cause — a trailing comma, a single-quoted string, an unquoted key — instead of a character offset you have to count to yourself. The document is parsed in your browser and never sent anywhere, so it is safe to paste an API response that contains customer data.

Helpful answers

Using this tool

Why does my JSON fail with a trailing comma?

Because JSON is not JavaScript. Trailing commas, comments, single quotes and unquoted keys are all valid in a JS object literal and all invalid in JSON. The error message names which of these it found.

Does sorting keys change the meaning of my document?

No. Object keys are unordered by definition, so sorting them is safe and makes diffing two documents practical. Array order is data, so arrays are left exactly as they are.

What happens to very large numbers?

Numbers that would lose precision are rejected. Keep large IDs and exact high-precision decimal values in quoted strings so they remain unchanged.

How large a document can it take?

One mebibyte. Formatting runs on the main thread of your own browser, and a larger document would stall the tab on a phone, so the limit is refused clearly rather than hanging.

ALCO Tools

Tool activity

Simple tools for everyday work.

Verified opens
Powered by ALCO

Get expert help from ALCO.

Need help with a website or a workflow beyond this tool? Explore ALCO’s website development services for your business.