Guides

Validate a JSON file with a trailing comma

Follow these steps using a local file and keep the original.

Validate a JSON file with a trailing comma
Actual local tool workspace with a synthetic sample.

Prepare the example

Create disposable test input with the exact content below (UTF-8 text unless marked hex). For duplicate filenames, save the two files in separate folders.

trailing.json
[1,2,]

Create a test JSON file containing [1,2,].

Run the workflow

  1. Open the related tool below and load the prepared file(s).
  2. JSON Validator reports invalid syntax or a parsing error; remove the final comma.

Verified example result

This example was reproduced in Chrome on 2026-12-04 using FileTypeKit 0.9.0 and synthetic data. The expected result or expected refusal was checked; this does not establish support for every real file.

The downloaded output was checked against the expected properties below.

Observed status: Unexpected token ']', "[1,2,]" is not valid JSON

Limitations and what to verify

Do not convert JSON errors into empty arrays without inspecting the original.

Open related tool