Developer utility

JSON Formatter & Validator

Format, validate, explore and analyze JSON instantly.

Free toolkit with a JSON formatter, encoder/decoder, encryption utility and JWT parser.

Everything is processed locally in your browser and is never uploaded.

Source

Input JSON

0 chars0 B

Paste JSON, drop a .json file, or try an example.Enter format · ShiftEnter validate · K commands

Result

Output

Formatted output will appear here.

Ready when you are.

0 matches
Selected path

Format or validate JSON to explore it as a tree.

Large containers are rendered on demand. A maximum of 500 items is shown per expanded container.

About the JSON Formatter

Paste JSON and this tool formats, validates and explores it in one pass. Validation reports the exact line, column and position of a problem together with the surrounding text; the tree view renders huge documents on demand; and the analyzer counts objects, arrays, keys, depth and null values. Because parsing uses the browser's own JSON.parse, no document is ever uploaded — the page keeps working even if you disconnect from the network.

What you can do

  • Format with 2 spaces, 4 spaces or tabs, and minify back to a single line.
  • Validate with line, column and position plus a snippet of the surrounding text.
  • Repair common mistakes — comments, trailing commas, single quotes and byte-order marks — behind an approval preview.
  • Explore a collapsible tree with search, JSON path inspection and value copying.
  • Analyze structure: container counts, depth, empty containers, largest containers and frequent keys.
  • Compare two documents structurally, ignoring whitespace.
  • Generate TypeScript, Kotlin, Java or Swift models, or convert an array of objects to CSV.
  • Keyboard shortcuts, a command palette and a light or dark interface.

How to use the JSON Formatter

  1. Paste JSON into the editor, drop a .json file onto it, or load one of the built-in examples.
  2. Choose Format JSON, Minify or Validate — ⌘Enter formats immediately.
  3. Open the Tree, Analyze, Diff, Generate Code or JSON → CSV tab to inspect the document further.
  4. Copy or download the result. Nothing is stored, logged or transmitted.

Keyboard shortcut: press Alt+1 to Alt+4 to move between tools, or K for the command palette.

Frequently asked questions

Is my JSON uploaded to a server?
No. This page is a static HTML shell with no back-end: parsing uses the browser's own JSON.parse and the text stays on your device. You can even disconnect from the network after the page has loaded and keep working.
How much JSON can it handle?
Documents up to about 10 MB. Larger inputs are refused so the browser stays responsive, and the structural analysis stops after 250,000 values with a notice that the totals are partial.
Can it fix invalid JSON?
It previews safe repairs for the most common problems: JavaScript-style comments, trailing commas, single-quoted strings and a leading byte-order mark. Nothing changes until you accept the preview.
Does it keep my data between visits?
No. Only your light or dark theme preference is stored, in localStorage. Pasted JSON is never saved and disappears when you close or reload the tab.