WebToolsForAll

Tools / Formatters & Beautifiers

JSON formatter and viewer

Inspect, compare and explicitly transform a strict JSON value.

Input

0 UTF-16 code units

Inputs start empty. Load example fills them only when you choose it. Reset clears current inputs and results.

Import a local text file

Output

Auto-format starts off. Formatting writes to Output; your source stays editable.

More options: print and local draft
Optional local draft

Saving stores a plaintext draft in this browser on this device. Do not save secrets or use this on a shared device. Nothing is saved or loaded automatically. Reset does not delete a saved draft; use Delete local draft.

No draft has been loaded.

Work through the task

Keep JSON formatting, comparison and explicit transformations in one workspace.

  1. Choose the edit, explore, compare or transform tab for the action you need.
  2. Tree and graph views are bounded presentations; the full formatted result remains available as text. Repair only previews supported trailing-comma removal.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

{"b":[2,1],"a":"007"} can be sorted by object key while preserving array order and the text value "007".

Limits and output behavior

Up to 100,000 input characters, 10,000 values and 40 data levels. Strict JSON rejects duplicate keys, trailing commas, nonfinite numbers and unsafe integers; quote large identifiers to retain their digits. Tree display is limited to 1,000 nodes, graph display to 200, and comparison display to 1,000 differences.

Troubleshooting

Check the parser diagnostic before switching views. A tree/graph display cap limits the presentation; use the full text output when the document has more displayed nodes.

Questions

Does sorting an object also reorder arrays?

No. The explicit object-key sort retains array order. Compare before applying a transformation when ordering is meaningful.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.