Extract Tail of JSON Files Online
Extract the last N rows from JSON files directly in your browser. Choose how many rows to keep and download the result — no upload required.
How to extract Tail of JSON files
- Drop your file onto the upload area. The total row count is shown and the first 200 rows are previewed.
- Enter how many rows to keep from the end in the Number of rows box. The default is 100.
- Click Extract Last Rows. The preview switches to the final rows of the file, in their original order.
- Click Download to save them in the same format you uploaded, with _tail added to the file name.
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 leisure centre appends every member check-in to a single export. The front desk manager only wants the two most recent visits to check a disputed entry.
Input (JSON)
[
{
"member_id": "M-2031",
"check_in_date": "2026-08-28",
"branch": "Riverside",
"minutes": 55
},
{
"member_id": "M-1177",
"check_in_date": "2026-08-29",
"branch": "Old Town",
"minutes": 40
},
{
"member_id": "M-2031",
"check_in_date": "2026-08-30",
"branch": "Riverside",
"minutes": 62
},
{
"member_id": "M-0948",
"check_in_date": "2026-08-31",
"branch": "Riverside",
"minutes": null
},
{
"member_id": "M-1177",
"check_in_date": "2026-09-01",
"branch": "Old Town",
"minutes": 35
},
{
"member_id": "M-3310",
"check_in_date": "2026-09-01",
"branch": "Riverside",
"minutes": 90
}
]Settings
- Number of rows: 2
Result
| member_id | check_in_date | branch | minutes |
|---|---|---|---|
| M-1177 | 2026-09-01 | Old Town | 35 |
| M-3310 | 2026-09-01 | Riverside | 90 |
The file has six rows, so the tool skips the first four and keeps rows five and six. They stay in file order, oldest first, rather than being reversed. The tool does not look at check_in_date at all. It only works because new check-ins were appended to the bottom of the file.
Working with JSON files
For a JSON array, the last N objects are the ones at the end of the array. Event logs exported as JSON are often newest first, not oldest first. In that case the head is the recent data and the tail is the oldest, so check the order before choosing between the two tools.
The output is a JSON array of the selected objects. Each object has the full set of keys found in the file, in a fixed order, with null for keys it did not have in the source. Nested objects and arrays are kept. If you need the rows in reverse order, newest at the top, sort the result by its date field afterwards. A single JSON object, rather than an array, loads as one row, so its tail is the whole object. Files with one object per line should use the NDJSON version of this tool.
Frequently Asked Questions
Does the tail reverse the order of my JSON objects?
No. The last N objects are returned in the same order they appear in the file. Use the Sort tool afterwards if you want them reversed.
Can I get the last N items of a nested array inside my JSON?
No. The tool works on the top-level array of records. For a nested array, use the SQL Query tool with a list slice.
Are the last rows returned newest first?
No. They keep the order they have in the file. The last row of the file is the last row of the result.
Does Tail sort by date before taking the last rows?
No. It uses file position only. To get the latest N records by a date column, sort by that column first and then take the tail, or use the Sort tool followed by Head.
What if N is larger than the number of rows?
You get the whole file. An empty or non-numeric value falls back to 100. 0 and negative numbers are treated as 1, so you always get at least one row.
Related Tools
Sort JSON Files Online
Sort JSON files by any column, ascending or descending, directly in your browser.
Filter JSON Files Online
Filter rows in JSON files by column value, directly in your browser. Your data stays on your device.
Extract Head of JSON Files Online
Extract the first N rows from JSON files directly in your browser. Choose how many rows to keep and download the result — no upload required.
Extract Tail of CSV Files Online
Extract the last N rows from CSV files directly in your browser. Choose how many rows to keep and download the result — no upload required.
Extract Tail of Excel Files Online
Extract the last N rows from Excel files directly in your browser. Choose how many rows to keep and download the result — no upload required.
Extract Tail of Parquet Files Online
Extract the last N rows from Parquet files directly in your browser. Choose how many rows to keep and download the result — 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.