JSON Formatter

Paste JSON, choose an indentation style and get clean, consistently indented output. The formatter is strict: if the input is not valid JSON it tells you where and why, instead of guessing.

Input

The result will appear here.

Ready In: 0 B Processed locally

How to use the JSON Formatter

  1. Paste JSON into the left editor, drop a .json file onto it, or use Upload.
  2. Pick 2 spaces, 4 spaces or tabs, and optionally sort keys.
  3. Press Format (or Ctrl+Enter). The result appears on the right.
  4. Copy it, download it as a .json file, or switch to Minify.

Features

  • Lossless: numbers such as 12345678901234567890 are kept digit for digit, and key order is untouched
  • Error messages with line, column and a suggested fix, with the error highlighted in the editor
  • Statistics: size, keys, depth and counts of each value type
  • Tree view of the formatted result with expand and collapse
  • Search and replace (Ctrl+F) in both editors

Supported input

Any valid JSON value: an object, array, string, number, boolean or null. Files up to 20 MB.

Limitations

  • Strict RFC 8259 JSON only. JSON5, comments and trailing commas are reported as errors, not silently removed.
  • Very large files (over about 10 MB) may take a few seconds on slower devices.

Privacy

Everything this tool does happens in your browser. What you paste or open is never uploaded, stored, logged or used for advertising. Closing the tab discards it. Read the privacy policy.

Frequently asked questions

01Why does the formatter refuse my file instead of fixing it?

Repairing JSON means guessing what you meant, which can quietly change data. The formatter points to the exact problem so you decide the fix.

02Will formatting change any values?

No. Strings and numbers are written back exactly as they appear in your input, including escape sequences and long numbers. Only whitespace changes (and key order, if you choose to sort).

03Is my data uploaded anywhere?

No. This tool runs entirely in your browser tab. Your input is never sent to our servers, stored, or logged. You can disconnect from the internet after the page loads and it keeps working.