JSON Formatter & Validator — Beautify, Minify, Lint

Pretty-print, minify, and validate JSON. Private by design—everything runs locally in your browser.

Formatter

Input: 0 B Output: 0 B Saving: —

Shortcuts: Ctrl/Cmd + Enter — Pretty (2). Ctrl/Cmd + Shift + M — Minify.

About this tool

This JSON Formatter & Validator runs entirely in your browser—no uploads, no external APIs. It uses the native JSON.parse and JSON.stringify for correctness. Enable Sort object keys for deterministic diffs, or allow the fixer to gently remove common trailing commas before validation.

Shortcuts

  • Ctrl/Cmd + Enter – Pretty print (2 spaces)
  • Ctrl/Cmd + Shift + M – Minify

FAQ

Does any JSON I paste get uploaded?

No. Everything runs locally in your browser. Nothing is sent anywhere.

Why do I see “trailing comma” errors?

Standard JSON does not allow trailing commas. Enable the “Attempt to fix trailing commas” option to remove common cases before parsing.

What does “Sort object keys” do?

It alphabetically sorts keys in objects, which helps with diffing and stable output. It does not change arrays.

5 Fun Facts about JSON

Strict, but tiny

JSON has only 6 value types (object, array, string, number, boolean, null)—no dates, no comments, no NaN. That’s why tools lean on strings for timestamps.

Minimal spec

53-bit ceiling

Parsed in JavaScript, integers above 9,007,199,254,740,991 lose precision (double math). JSON itself allows them—but JS can silently round them.

Big number gotcha

Order is a polite illusion

The spec says object key order is meaningless, yet modern engines preserve insertion order. Sort keys if you want deterministic diffs—not because JSON guarantees it.

Stability trick

Emoji need two escapes

Unicode escape sequences are 16-bit. A rocket 🚀 becomes \"\\uD83D\\uDE80\" in JSON—two code units, one emoji.

UTF-16 peek

Line-delimited superpower

JSON Lines/NDJSON keeps one JSON object per line, letting you stream logs, grep them, or append forever without re-serializing the whole file.

Streaming friendly

Explore more tools