Skip to main content
Tools

JSON Formatter

Beautify, minify and validate JSON with precise line and column error locations.

Indent

0 characters · 1 line

How to use

  1. Paste or type JSON into “Input JSON”, or click “Example” to try it out.
  2. The result appears instantly on the right (below on phones). Syntax errors show the line, column and reason.
  3. Click “Format” for indented output, or “Minify” to remove all whitespace and make it smaller.
  4. Pick an indent size, or turn on “Sort keys” to order object keys alphabetically.
  5. Click “Copy” or “Download” to grab the result.

FAQ

Is my JSON uploaded?

No. Formatting and validation happen in your browser. Your data never leaves your device, and the tool even works offline.

How are line and column numbers counted?

Both start at 1. Columns count characters, so a Chinese character or an emoji counts as one, which makes the spot easy to find in your editor.

Will large numbers be changed?

No. Numbers are kept exactly as written, so 12345678901234567890 or 1.0 come out unchanged, unlike JavaScript’s JSON.parse, which loses precision.

Can it handle JSON with comments or trailing commas?

Standard JSON allows neither. The tool points out where they are so you can fix the file and make it readable by any program.

Does “Sort keys” reorder arrays?

No. Only object keys are sorted. The order of array items is part of your data and is always kept.

Keyboard shortcuts

/
Search tools (on a tool page, goes to the homepage search)
?
Show this help
Esc
Close a dialog
Ctrl / ⌘Enter
Run the tool's main action (where supported)

While you type in a text field, / and ? are typed as usual.