Files are read locally by your browser. Nothing is uploaded, stored, or sent to a backend.

Paste one JSON object per line, or open a local .ndjson, .jsonl, .txt, or .log file.

No file selected. Paste NDJSON above or open a local file.

- Formatted Results -

Valid lines will be pretty-printed here. Invalid lines will show their original line number and parse error.

Waiting for NDJSON.
0 non-empty lines
0 valid lines
0 invalid lines

Nothing formatted yet

Paste NDJSON above, open a local file, and choose Format NDJSON. The formatted records will appear here.

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.

How this formatter works

This formatter keeps the process intentionally simple:

  1. It splits the text into lines.
  2. It skips empty lines.
  3. It parses each line as JSON.
  4. It pretty-prints valid lines.
  5. 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 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. If it still works, that tells you the formatting is happening in your browser.

You can also open your browser developer tools, check the Network tab, and then format 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 formatted data

Formatting makes NDJSON easier to read. It does not make logs or exported data safe to share.

Before sending formatted 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 type documents) to justify sending everything, you will be better off and far more secure if you only copy what you need. Alternately if you're a little more advanced and don't mind digging deeper into these files, you can (and should) start learning about sanitizing data.

Other Tools

About Tools

Greg built every tool on hluska.ca to run locally in the browser with no backend. This means your data is never sent anywhere - it stays on your device. These tools are designed for practical use, primarily for Greg's personal use and so they reflect his tastes and needs. They're not polished products, some are rough around the edges and others will prove to be horrible mistakes. But web development wouldn't be so fun and glamourous if you didn't occasionally embarrass yourself in public.