Format, validate, minify and sort JSON with exact error positions
Runs in your browser. Nothing you type is sent anywhere. Updated on 24 Oct 2026.Formatting JSON indents it so it can be read, and validating points at the exact line and column where it breaks, such as line 3, character 17. You can also minify, sort keys and copy the result. Everything runs in your browser, so an API key in a payload is never sent anywhere.
Paste your JSON into the Input pane, or click Try an example.
Choose 2 spaces, 4 spaces or Tab under Indent, and turn on Sort keys to put keys in alphabetical order.
If the input is invalid, read the line, column and hint shown under the Input pane and fix that spot.
Click Copy to take the formatted JSON, or the download icon to save it as data.json.
This JSON formatter turns compact or messy JSON into a clean, indented document you can read, and tells you exactly where it breaks if it is not valid. Choose two spaces, four spaces or tabs, sort keys alphabetically, or minify back to a single line for production.
People use it when an API response arrives on one line, when a config file stops loading and the error message only says "unexpected token", or when two teams need the same file diffed with keys in the same order. Paste, press Ctrl+Enter, copy the result.
Everything happens in your browser. The text you paste is never sent to a server, which makes it safe for payloads that contain keys, customer data or internal URLs. There is no size limit beyond what your browser can hold; files of several megabytes format in well under a second.
If validation fails you get the line and column plus a plain-English fix, such as "Remove the trailing comma" or "Property names must be wrapped in double quotes". For structured browsing, switch to the tree view and collapse what you do not need. Related tools: JSON to TypeScript, YAML to JSON, CSV to JSON.
Yes, free with no signup, no usage limit and no watermark on anything you copy or download. The site is funded by a small number of ads shown below the tool, never inside the editor, and no feature is held back for a paid plan.
No. Formatting, validation and minifying all run in your browser with JavaScript, so nothing you paste leaves your device and no copy is kept on a server. API responses holding access tokens, customer names or bank details are safe to paste here.
Paste the text and press Format. The error message shows the line and column, highlights the line, and suggests the most likely fix, for example removing a trailing comma or replacing single quotes with double quotes.
Yes. Choose 2 spaces, 4 spaces or Tab in the options bar and the output reindents as you change it. The choice is remembered on this device, so the next file comes back in the same style. Minify removes the indentation altogether for a production payload.
No. Sorting rewrites the order in which keys appear, and a JSON object has no defined key order, so the parsed value is identical. Arrays keep their original order, because position is part of the data in an array. Sorting both sides first makes a diff far shorter.
No fixed limit is imposed. A file of a few megabytes formats in well under a second on a normal laptop, and the real ceiling is the memory your browser gives a single tab. A very large document still works, but the editor scrolls less smoothly, so minify or split it first.
Still stuck? Ask about JSON Formatter & Validator and anybody who knows can answer. No account needed.
Same job, other tools: JavaScript Beautifier – Reformat JavaScript with Prettier, in the indent style you use · GraphQL Validator – Check a GraphQL query or schema for errors, optionally against your own SDL · HTML Minifier – Strip comments and spare whitespace from HTML and see the saving · CSS Minifier – Compress a stylesheet and see exactly how many bytes you saved · JS Minifier – Shrink a JavaScript file with terser and see the size saved.
On the related tools: Remove Tracking Parameters – Strip utm, fbclid and gclid from a link before you share it.
In the collections JSON Tools · Code Formatters and Minifiers.