JSON Lines Viewer · Tutorial
How to find failed requests in a JSON Lines log
5 min readbeginnerUpdated
Your app writes structured logs as JSON Lines, and you need to find out why checkouts are failing. Scrolling through raw log lines is slow and error-prone. This tutorial shows how to open the log in the JSON Lines Viewer, filter it down to the failing requests, compare them in a table, and export them to share with a teammate.
What you need
- The JSON Lines Viewer
- A log file in JSON Lines format (the Try it button loads a short API log)
Steps
Open the log
Drop the .jsonl, .ndjson or .log file onto the file area, or paste the lines into the box. The summary shows how many records were read and how many fields they contain. The sample has 7 records with 9 different fields.
Check for broken lines
If any line isn't valid JSON, it appears in a red list with its line and column, for example a record cut off when the log was rotated. These lines are skipped so the rest of the file still loads. Click a line number to jump to it.
Filter to the failures
Type
error 500into the filter box. Only records containing both words remain. In the sample, two/checkoutrequests failed withpayment gateway timeout, each taking about 2.4 seconds.Compare them in the table
Stay on the Table tab to see each field in its own column. Here, the
mscolumn shows the failed requests were around 30 times slower than successful ones, which points towards the payment gateway rather than your own code.Export what you found
Press Download as JSON array to save the filtered records as a standard JSON file you can attach to a ticket. Or use Copy as JSON array and paste the records into a chat or into the JSON Formatter Tree tab to explore one in depth.
[ { "ts": "2026-10-30T08:01:19Z", "level": "error", "path": "/checkout", "status": 500, "ms": 2410, "error": "payment gateway timeout" } ]
Try it yourself
Opens the JSON Lines Viewer with this tutorial's sample loaded.
Common mistakes
- Opening a pretty-printed JSON file
- JSON Lines needs one complete value per line. A formatted JSON file spreads each object over many lines, so every line looks invalid. Use the JSON Formatter Tree tab for regular JSON files instead.
- Expecting the export to include filtered-out records
- Downloads include only the records currently matching the filter. Clear the filter to export everything.
- Sharing logs with personal data
- Logs often contain emails, IP addresses or tokens. Remove them before attaching records to a public ticket.
Next steps
Go back to the JSON Lines Viewer, or keep going with one of these:
FAQ
Can I search for a value in one field only?
The filter matches anywhere in the record. Include the field name and value together, such as "status":500, to be more precise.