What is NDJSON?
NDJSON stands for newline-delimited JSON. Instead of storing one large JSON array, an NDJSON file stores one JSON value per line.
That makes it useful for logs, exports, streamed data, and other situations where programs need to write records one at a time.
A tiny NDJSON file might look like this:
{"level":"info","message":"Started"}
{"level":"warn","message":"Slow response"}
{"level":"error","message":"Something failed"}
Each line is separate JSON. That is great for programs, but it can be awkward for humans to read when the file gets large.
What this tool validates
This tool validates NDJSON syntax one non-empty line at a time. Each non-empty line must be valid JSON.
Invalid lines are reported with their original line number and JSON parser error. Valid lines remain available for formatting, searching, expanding, and copying.
This is a syntax validator. It does not validate a JSON Schema, require particular fields, or confirm that every record has the same structure.
How this tool works
This tool keeps the process intentionally simple:
- It splits the text into lines.
- It skips empty lines.
- It parses each line as JSON.
- It pretty-prints valid lines.
- It shows the original line and parser error for invalid lines.
One broken line should not hide the rest of the file. That is one of the nice things about NDJSON: each line can be inspected on its own.
Privacy and local files
This page runs in your browser. There is no account, no backend upload, and no server-side storage.
If you open a local file, your browser reads the file so this page can format and validate it. The file is not uploaded to hluska.ca.
If you refresh or close the page, the current input is gone. That is intentional.
Want to test that?
After this page loads, turn off your internet connection and try using the formatter and validator. If it still works, that tells you the processing is happening in your browser.
You can also open your browser developer tools, check the Network tab, and then format or validate a file. You should not see the file being uploaded anywhere.
That does not mean every browser tool is safe. It just gives you a practical way to check what this page is doing.
Before sharing data
Formatting and validation can make NDJSON easier to inspect. They do not make logs or exported data safe to share.
Before sending data to another person or company, check for values such as:
- tokens
- secrets
- passwords
- email addresses
- usernames
- file paths
- machine names
- internal URLs
- customer data
- session IDs
- API keys
Unless you have strong protections in place, including legal and data-sharing documents that justify sending everything, you will be better off and far more secure if you only copy what you need. Alternately, if you are a little more advanced and do not mind digging deeper into these files, you can and should start learning about sanitizing data.