Free private JSON formatter and validator

Clean up JSON.
Find the broken spot.

Paste JSON or open a .json file. Make it readable, find syntax errors, sort object keys, create a compact copy, or explore the data as a tree.

Your JSON stays private. It is processed entirely in this browser tab. It is not uploaded, logged, or sent to an API.Version 1.1.0: Exact number text is preserved, stale results can no longer be copied, and large trees wait until you open them.

01

Paste or open your JSON

Then choose Format, Compact, Sort, or Tree view. Your JSON itself is never saved.

Drop a .json file here
Or choose a file or paste JSON directly into the left editor.

Keyboard: Ctrl/⌘ + Enter formats the current JSON.

JSON to check

You can edit this

Clean result

Items found0
Nested levels0
Result size0 B
Top level-

What each choice does

Four useful ways to handle JSON.

01

Format and check

Adds readable indentation and tells you where invalid JSON is probably broken.

02

Compact or sort

Compact removes unnecessary spaces. Sort puts object keys in A–Z order while leaving array order alone.

03

Open Tree view

Browse nested objects and arrays by opening and closing sections. The tree is built only when you ask for it.

04

Keep exact numbers

Large integers, decimals, exponents, and negative zero keep the same numeric text you pasted instead of being rounded by JavaScript.

Straight answers

JSON questions.

What is JSON?

JSON is a plain-text format used by websites, apps, APIs, and configuration files to store structured data such as names, settings, lists, and values.

Does sorting keys change the meaning of JSON?

Object key order should not carry meaning in JSON. Arrays can depend on order, so this tool never rearranges array items. Special object keys such as __proto__ are preserved as ordinary JSON data.

Will formatting change a large number?

No. The formatter preserves the exact numeric token from the source, including integers beyond JavaScript's safe range, decimal precision, exponent notation, and negative zero.

Why does valid JavaScript sometimes fail as JSON?

JSON requires double-quoted property names and strings. It does not allow comments, trailing commas, undefined, functions, NaN, or Infinity.

Can I safely paste private API data here?

The formatter does not transmit the text. You should still remove passwords, API keys, and other secrets before sharing the formatted result with someone else.