Make a compact JSON response readable before you inspect it. Follow the example, then adapt the settings to your own work. Open JSON Formatter.
Paste a compact JSON example
Open JSON Formatter and choose Write or paste JSON. Copy the example below into JSON input. It contains a project name, the integer 9007199254740993, a boolean and a two-item array.
Alternatively, select Upload JSON file or drop a UTF-8 .json or .txt file onto the entry area. Input is limited to 1 MB. A valid JSON document can also be a top-level array, string, number, boolean or null; it does not have to be an object.
Use the exact example input
{"project":"Atlas","id":9007199254740993,"active":true,"tags":["draft","review"]}Paste JSON itself, without Markdown code fences. JavaScript comments, trailing commas and single-quoted keys are not valid JSON.
Validate, then choose the formatting
Select Validate only to check syntax without leaving the editor. If there is a problem, the message gives a line and column and selects the error location when available. Correct the source and validate again; the tool does not silently repair an ambiguous document.
Leave Indentation at 2 spaces and Sort object keys unchecked for this example, then select Format JSON. Four spaces and Tabs are also available. Minify JSON creates a compact result by removing layout whitespace, while preserving spaces inside string values.
The example in this guide
Verified with i2TEXT on November 11, 2026, with 2-space indentation and key sorting off.
- Indentation
- 2 spaces
- Saved output
- 111 bytes
- Numeric ID
- 9007199254740993
Inspect the code, value and tree
The downloaded example is 111 UTF-8 bytes and retains the exact integer 9007199254740993. The formatter stores the original number spelling instead of first converting it into an ordinary JavaScript number, so this value is not rounded to a nearby integer.
Use Code to inspect the complete formatted text. Switch to Tree and expand the tags array to inspect its items. Copy path copies a bracket-style location such as $["tags"][0]. It does not copy the value at that location.
Sort object keys sorts properties in nested objects as well, but never rearranges array items. Duplicate keys are preserved and flagged, because different receiving systems may interpret them differently. Resolve a duplicate when the destination requires one unambiguous value.
Save the version you reviewed
Use the download icon to save formatted.json, or use the copy icon to copy the generated JSON. The filename is the same for formatted and minified results. Use Back to editor for a source or setting change, then format or minify again before saving.
The parser supports up to 100,000 values and 96 nested levels. The tree preview displays up to 1,500 values, while Code and the download retain the complete supported output. Formatting also has a limit of 4,194,304 characters for formatted output; smaller indentation or minification can help when spacing creates a large output.
Processing happens in your browser. Save important results before refreshing the page. A downstream application can still round a long number when it parses the file, so verify the value in the receiving system too.
Compact project JSONformatted.json
Common questions
Will formatting change string values or array order?
No. Layout whitespace changes around values. String spellings and numeric tokens are retained, and array item order is preserved. Optional sorting affects object keys.
Why does valid JSON still fail in my API?
Syntax validation does not check an API schema, required fields or business rules. A syntactically valid document can still be unsuitable for a particular service.
Why is the Tree view shorter than the Code view?
The tree has a 1,500-value preview limit for responsiveness. Code and the download contain the complete output within the parser and output limits.
Try JSON Formatter with your own task.
Use your own source and review the result before sharing.