Add Cumulative Sum to JSON Files Online
Add a running total column to JSON files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.
How to add Cumulative Sum to JSON files
- Drop your file onto the upload area. It is loaded into the in-browser engine and the first 200 rows are shown.
- Choose the value column to sum. Only numeric columns are listed, and the first one is preselected.
- Choose an Order by column, usually a date or sequence number. Leave it at (none) to add up rows in file order, top to bottom.
- Optionally choose a Partition by column so the running total restarts for each group. Rename the output column from cumulative_sum if you like, then click Add Cumulative Sum.
- Check the preview and download the file in the same format you uploaded.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A facilities team logs daily solar generation in kWh for two roof arrays. They want month-to-date output for each array, so the running total must restart per site.
Input (JSON)
[
{
"reading_date": "2026-06-01",
"site": "Roof A",
"kwh": 18.5
},
{
"reading_date": "2026-06-01",
"site": "Roof B",
"kwh": 11
},
{
"reading_date": "2026-06-02",
"site": "Roof A",
"kwh": 21
},
{
"reading_date": "2026-06-02",
"site": "Roof B",
"kwh": 9.5
},
{
"reading_date": "2026-06-03",
"site": "Roof A",
"kwh": 16.5
},
{
"reading_date": "2026-06-03",
"site": "Roof B",
"kwh": 12.5
}
]Settings
- Value column: kwh
- Order by: reading_date
- Partition by: site
- Output column name: cumulative_sum
Result
| reading_date | site | kwh | cumulative_sum |
|---|---|---|---|
| 2026-06-01 | Roof A | 18.5 | 18.5 |
| 2026-06-01 | Roof B | 11 | 11 |
| 2026-06-02 | Roof A | 21 | 39.5 |
| 2026-06-02 | Roof B | 9.5 | 20.5 |
| 2026-06-03 | Roof A | 16.5 | 56 |
| 2026-06-03 | Roof B | 12.5 | 33 |
Each site gets its own running total in date order: Roof A goes 18.5, 39.5, 56 and Roof B goes 11, 20.5, 33. The rows stay in their original order. With Order by and Partition by both left at (none), the total would run down the file instead: 18.5, 29.5, 50.5, 60, 76.5 and 89.
Working with JSON files
Only keys that hold numbers in every object are offered as the value column. A key that sometimes holds "12.5" as a string is loaded as a JSON-typed column and is not listed. Objects that are missing the value key count as null. They add nothing, and the running total repeats the previous figure on those objects. Nested numbers, such as reading.kwh, must be flattened to the top level first. Booleans are not summed, so true and false keys do not appear in the value list.
With Order by at (none), the total runs in array order, from the first object to the last. That suits JSON exports that have no date field and rely on array position. In the output array, the running total is the last key of each object, and the objects stay in their original order.
Frequently Asked Questions
My JSON array is already in order. Do I still need an Order by key?
No. Leave Order by at (none) and the total runs in array order. Pick an Order by key only when the array is not already sorted.
What happens to JSON objects without the value key?
The missing value is treated as null. It adds nothing, so the running total on that object equals the previous one.
What does (none) in Order by do?
It adds up rows in file order, top to bottom. With a Partition by column, each group has its own running total, still in file order. Pick a date or sequence column when the file is not already sorted.
How does the total restart for each group?
Choose a Partition by column. The total starts again at the first row of each group value, in Order by order or in file order when Order by is (none). Rows are not regrouped, so they keep their original order.
How are rows with the same Order by value handled?
They are added in file order, one row at a time. The result is the same every time you run it.
Related Tools
Add Percent of Total to JSON Files Online
Add a percentage-of-total column to JSON files directly in your browser. Show each row's share of the grand total, or the share within each group — no upload required.
Add Moving Average to JSON Files Online
Add a moving average, rolling sum, rolling min, or rolling max column to JSON files directly in your browser. Choose window size, order-by column, and optional partitioning — no upload required.
Add Lag / Lead Column to JSON Files Online
Add a LAG or LEAD column to JSON files to shift any column forward or backward by N rows. See previous day's sales, next value in a sequence, or any time-shifted comparison — runs entirely in your browser.
Add Cumulative Sum to CSV Files Online
Add a running total column to CSV files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.
Add Cumulative Sum to Excel Files Online
Add a running total column to Excel files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.
Add Cumulative Sum to Parquet Files Online
Add a running total column to Parquet files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.
JSON Viewer Online
View and inspect JSON files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert JSON to Parquet Online
Convert JSON files to Parquet format directly in your browser. No upload required — your data never leaves your device.