Skip to content
TheFilesGuy
en
Menu

.json

JSON Formatter & Validator

Make JSON readable, compact it, and find errors fast.

Files never leave your device.

Processed on this device. Nothing is uploaded.

About JSON Formatter

Minified JSON from an API or log file is hard to read, and a single missing comma can break a config file. Paste JSON or open a file and it is checked and pretty-printed as you type, with two or four spaces or tabs. Choose Minified to strip all whitespace for production, or sort keys alphabetically to make two files easier to compare. When the JSON is invalid, you get the exact line and column of the problem, plus hints for common mistakes such as single quotes and trailing commas.

How to Use It

  1. 01

    Paste or open JSON

    Paste JSON into the left box, or press Open file.

  2. 02

    Pick the style

    Choose 2 or 4 spaces, tabs, or Minified, and optionally sort keys.

  3. 03

    Fix and copy

    Fix any error at the line shown, then copy or download the result.

Questions

What are the most common JSON errors?

Single quotes instead of double quotes, a comma after the last item, keys without quotes, and comments. JSON allows none of these.

Does formatting change my data?

No. Only whitespace changes, and key order if you choose to sort. Values stay exactly the same.

Can it handle large files?

Yes. Files of several megabytes format in a moment. Very large files update slightly after you stop typing.

Is my JSON uploaded?

No. Everything runs in your browser, so API keys and private data stay on your device.

See all data tools

Learn More