The useful answer

Valid JSON needs double-quoted property names and strings, with no trailing commas. Format Lab validates before pretty-printing; it does not silently repair ambiguous input.

Before you start

A long, compact JSON line is difficult to inspect, but indentation cannot fix invalid syntax. A trailing comma, an unquoted key or a missing bracket must be addressed before a parser can understand the structure. An automatic repair that guesses your intent may conceal a more serious content error.

The supplied broken file contains a trailing comma after the last property. It is a small, deliberate failure example. The corrected version preserves the same key names and values while removing that extra separator. Error wording comes from the browser parser and may differ between browser versions.

Your practice file

broken-record.json · Original Deskcraft example · Reusable for practice

Download source ↓

The walkthrough

Load the deliberate failure

Open broken-record.json in Format Lab. Select Validate / format JSON and click Convert text. The tool should report a parsing error and leave the download button disabled.

Identify the structural mistake

Read the short source carefully. The comma after the final value is followed directly by a closing brace. A comma separates another member; it cannot remain after the last member in JSON.

Correct only that mistake

Remove the trailing comma so the text becomes {"project":"Desk reset","ready":true}. Keep the boolean true without quotation marks because the sample intends a boolean, not the string true.

Run formatting again

Click Convert text. The result should use two-space indentation and place the two properties on readable lines. This verifies syntax and presentation; it does not prove that the project name or ready status is correct.

Save the repaired version separately

Download the formatted JSON with a new name and retain the broken sample for comparison. For a real configuration file, test the corrected file in its application before replacing a working configuration.

Before & after, in practice

What we checkedStarting comparisonAfter the change
OutputExpected double-quoted property name in JSON at position 37 (line 1 column 38)47 bytes
File extensionNo valid outputjson

Recorded in Chrome 153.0.8010.54. These are measurements of this practice file, not guaranteed results for every file or browser.

Format Lab: Starting comparison for Find a broken JSON file before you format it
Starting comparison. Actual Format Lab operation captured with the supplied practice file. Select the image to inspect the settings at full size.
Format Lab: After the change for Find a broken JSON file before you format it
After the change. Actual Format Lab operation captured with the supplied practice file. Select the image to inspect the settings at full size.
Inspect the demonstrated result

Download the actual output recorded for this walkthrough.

Download result ↓

When it goes wrong

Single quotes still cause an error

JSON strings and property names use double quotes. Do not assume JavaScript object literal syntax is interchangeable with JSON.

The file is valid but the application rejects it

Syntax validation is different from schema or business-rule validation. Check the required keys and value types for that application.

A very large number changed

JavaScript JSON parsing uses its number representation. Keep exact long identifiers as quoted strings; this tool is not a lossless arbitrary-precision JSON editor.

The final check

The corrected result should contain project as a string and ready as a boolean. Re-run it through the formatter to confirm it remains valid. Do not describe the file as fully validated unless the receiving system’s schema and behavior have also been checked.

Keep one clean original. The tools create a new copy. They do not overwrite your source. For important work, verify the downloaded result in the application that will actually use it.

Further reading & method

These links explain the underlying formats or browser behavior. The steps, examples, screenshots and measured results above come from the Deskcraft tools. Screenshots do not depict Excel, Photoshop or another commercial application.

See how these guides are made. Found an error? Send a correction with the guide title and the step you tried.