Find a tool

↑↓ navigate Enter open

Use a task word when you do not know the exact name.

JSON Formatter and Validator

Local only

The JSON Formatter validates, repairs, indents, sorts, minifies, and searches JSON in your browser. It offers code and tree views with on-demand branches plus optional lossless large-number parsing without uploading your input.

Reviewed · Updated · Free to use · No account required

JSON Workspace
Input0 chars
Plain text · UTF-8⌘ + Enter format
Output
Formatted JSON will appear here.
Waiting for input0 lines · 0 B
Your JSON stays in this browser tab. It is saved locally only when Remember draft is enabled.

What does the JSON Formatter do?

The KitLumi JSON Formatter turns compact JSON into readable, indented text and checks strict JSON syntax. It also supports recursive key sorting, minification, JSON5 repair, exact-number parsing, file input, undo and redo, a tree with on-demand branches, optional local draft restore, printing, and fullscreen editing.

Formatting changes whitespace, not the parsed JSON value. Minifying performs the reverse operation by removing optional whitespace. The parser follows the JSON grammar described in RFC 8259 (opens in a new tab).

Does this JSON Formatter send data to a server?

No. The JSON Formatter uses browser-side parsers and a local Web Worker for standard input at or above 100 KB. Your input is not submitted to a KitLumi endpoint or added to the page URL. It is written to local storage only when you deliberately enable Remember draft, and disabling that option removes the saved draft.

How do you format and validate JSON?

  1. Paste, type, or open JSON. Validation starts after a short pause when Auto format is enabled. Use Sample if you want a safe example.
  2. Choose the output. Select two, three, or four spaces or tabs. Turn on Sort keys, Minify, Lossless numbers, or Tree view when needed.
  3. Fix or export. Invalid JSON shows a parser message with its line and column when available. Valid output can be copied or downloaded as formatted.json.

Should you format or minify JSON?

Format JSON when a person needs to read, review, or debug it. Minify JSON when whitespace size matters and people do not need to edit the payload directly.

ModeBest forWhitespaceData value
FormatCode review, debugging, documentationAdds indentation and line breaksUnchanged
MinifyCompact payloads and storageRemoves optional spaces and line breaksUnchanged

What does formatted JSON look like?

A compact object such as {"name":"KitLumi","local":true} becomes the following two-space-indented JSON:

{
  "name": "KitLumi",
  "local": true
}

Both versions represent the same object. The formatted version is easier to scan and produces clearer code-review diffs.

What are the most common JSON syntax errors?

Invalid patternWhy it failsValid replacement
{'name': 'Ada'}JSON strings and property names require double quotes.{"name": "Ada"}
{"a": 1,}Strict JSON does not allow a trailing comma.{"a": 1}
{name: "Ada"}Property names cannot be bare identifiers.{"name": "Ada"}
{"a": undefined}undefined is not a JSON value.{"a": null}
{"a": 1 // note}JSON does not support comments.Remove the comment or store it as a string field.

What should you check before formatting sensitive or numeric data?

The JSON Formatter runs locally, but browser extensions and device policies are outside this page’s control. Use a trusted browser profile for secrets. Standard mode represents JSON numbers as JavaScript values; enable Lossless numbers when every numeric digit must remain exact. Quote large identifiers when they are identifiers rather than values used for arithmetic.

Frequently asked questions about JSON formatting

Does the JSON Formatter upload my data?

No. The JSON Formatter parses and formats input inside your browser. It is not sent to a KitLumi server or added to the URL. Browser storage is used only if you explicitly enable Remember draft.

What is the difference between formatting and minifying JSON?

Formatting adds line breaks and indentation for people to read. Minifying removes optional whitespace for a smaller payload; both outputs represent the same JSON value.

Why is my JSON invalid?

Common causes are trailing commas, single-quoted strings, comments, unquoted property names, and missing brackets. Strict JSON requires double quotes and does not allow comments or trailing commas.

Can the JSON Formatter sort object keys?

Yes. Enable Sort keys to order keys recursively in every object. Array item order is preserved because changing array order would change the data.

Can I format very large JSON files?

Large input is processed in a Web Worker after it reaches 100 KB, which helps keep the page responsive. The practical limit still depends on the memory available to your browser and device.

Will the formatter preserve very large numbers exactly?

Yes when Lossless numbers is enabled. Standard mode uses the browser JSON parser, while lossless mode keeps the original JSON number text instead of rounding through JavaScript Number.

What changed?

Performance update · October 2, 2026

Moved large input and lossless-number parsing to a Worker, disabled expensive highlighting for large output, and added on-demand tree branches with batches of 100 children.

Who maintains this tool?

TB
KitLumi EngineeringMaintains tool behavior, privacy disclosures, examples, and automated tests for KitLumi utilities.