ToolCozy
JSON Format / DiffHOTBase64 CodecHOTURL CodecNEWTimestamp ConverterNEWUUID GeneratorHash CalculatorJWT DecoderQR Code GeneratorUnit ConverterNumber BaseData ConverterSQL FormatterIP Lookup
Image CompressHOTColor ConverterImage ConvertImage CropNEWApp Store ScreenshotNEW
Regex TesterNEWWord CounterText DiffMarkdown Preview

More Products

Playbit Games

Free online HTML5 games — play instantly in your browser

Kaola Screenshot

App Store screenshot generator with device frames & templates

Pillease

Simple pill reminder app — never miss a dose again

© 2026 ToolCozy·Privacy·Feedback

JSON Format / Diff

JSON format, beautify, minify & side-by-side diff

Indent:
About this tool

JSON (JavaScript Object Notation) is the most common data format for web APIs, configuration files, and service-to-service data exchange. This online JSON formatter beautifies minified JSON, validates syntax, minifies for production payloads, and compares two JSON documents side-by-side.

Everything runs locally in your browser — your data is never uploaded to any server. You can verify this by opening the Network tab in your browser DevTools while using the tool.

How to use

Format & minify

  1. Paste your JSON into the input box on the Format tab.
  2. Click Format to apply indentation, or Minify to strip whitespace.
  3. Copy the result with one click, or download as a .json file.

Diff two JSON documents

  1. Switch to the Diff tab.
  2. Paste the original JSON on the left and the modified JSON on the right.
  3. Differences are highlighted line by line — added, removed, and changed values are color-coded.

Examples

Format minified JSON

Input
{"name":"Alice","age":30,"hobbies":["coding","music"]}
Output
{
  "name": "Alice",
  "age": 30,
  "hobbies": [
    "coding",
    "music"
  ]
}

Minify formatted JSON

Input
{
  "id": 1,
  "active": true
}
Output
{"id":1,"active":true}
Frequently asked questions
Is my JSON data sent to any server?

No. All formatting, validation, and diff comparison runs entirely in your browser using JavaScript. We don't log, store, or transmit your input.

What's the maximum JSON size I can format?

There's no hard limit, but performance depends on your device. Most browsers handle 10MB+ JSON files smoothly. Files over 50MB may cause noticeable lag during formatting.

Why does formatting fail with "Unexpected token"?

This usually means the JSON is invalid. Common causes: trailing commas, unquoted keys, or single quotes around strings. Strict JSON requires double quotes and forbids trailing commas.

Does this tool support JSON5, JSONC, or comments?

No. This tool follows the strict JSON spec (RFC 8259), so comments and trailing commas are rejected. For lenient parsing, use a JSON5-specific tool.

How is the diff different from a plain text diff?

The diff is structural: it compares values by JSON path, so key order doesn't matter. {"a":1,"b":2} and {"b":2,"a":1} are considered identical, unlike a text diff.