JSON formatter

Your workspaceProcessed on your device

Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.

Sorting changes object key order recursively; array order and duplicate-key order are preserved. Keys use UTF-16 order.

A few things to know.

Strict JSON only: comments and trailing commas are rejected. Optional key sorting compares decoded keys in UTF-16 order recursively; arrays and identical-key order are preserved. Formatting preserves the source spelling of numbers and strings. Duplicate keys are flagged, not removed. Limit: 1 million characters and 256 nesting levels. Tree view supports up to 10,000 syntax nodes and 2 million characters of paths and values, and displays children in groups of 100. Larger documents still produce a full formatted result.

  1. Paste a JSON document or load a local text file.
  2. Choose Format or Minify.
  3. Review validation messages, then copy or download the result.