JSON Formatter & Validator

Runs entirely in your browser
Input JSON
0 chars0 lines
T
ALL TOOLS · THE CATALOG
34 single-purpose utilities · runs local
Browse all →
All tools process files entirely in your browser · Your data never leaves your device

JSON Formatter — Free Online Pretty-Print, Minify & Diff

Format and validate JSON instantly. Pretty-print with 2/4/tab indent, minify for transmission, or diff two JSON blobs side-by-side. Everything runs in your browser — your data stays local.

How to format and validate JSON online

  1. Paste your JSON. Paste raw JSON into the left editor, or drag a .json file into the editor area. Up to 10 MB works smoothly.
  2. Pick indent style. Choose 2 spaces, 4 spaces, or tab indentation. The formatted output appears live in the right pane.
  3. Validate. Invalid JSON shows the exact line and column of the error in red, with a one-line explanation of what went wrong.
  4. Copy, minify, or diff. Copy formatted output, switch to minify mode (single-line output for transmission), or load a second blob into the diff view.

Frequently Asked Questions

Is my JSON uploaded or logged?
No. Formatting, validation, and diff run entirely in your browser. Nothing is sent to a server.
What is the maximum file size?
Up to ~10 MB performs smoothly. Larger files may slow the editor. For >50 MB consider a CLI tool like jq.
Does it sort keys alphabetically?
Yes — toggle the "Sort keys" option to alphabetize object keys recursively. Useful for stable diffs.
Can it handle JSON5 or JSONC (with comments)?
Yes — toggle the "Allow comments" option. Output is valid JSON (comments stripped).
How does the diff view work?
Load JSON A and JSON B. Differences are highlighted line-by-line. Added keys appear green, removed red, changed yellow.
Will it preserve number precision?
JavaScript number precision (53-bit) is preserved. For larger integers (BigInt), use a CLI tool.

Use Cases