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

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

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

- Converted JSON -

Valid NDJSON will be converted into a pretty-printed JSON array. 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 converted yet

Paste NDJSON above, open a local file, and choose Convert to JSON. The converted output will appear here.

What does this converter do?

This converter turns newline-delimited JSON into a regular JSON array.

For example, it turns NDJSON like this:

{"level":"info","message":"Started"}
{"level":"warn","message":"Slow response"}
{"level":"error","message":"Something failed"}

into JSON like this:

[
  {
    "level": "info",
    "message": "Started"
  },
  {
    "level": "warn",
    "message": "Slow response"
  },
  {
    "level": "error",
    "message": "Something failed"
  }
]

Each non-empty line becomes one item in the output array.

When is NDJSON to JSON useful?

NDJSON is useful when programs write or process records one at a time. That makes it common in logs, exports, data pipelines, and streaming-style tools.

Regular JSON arrays are often easier to use when you need to inspect, share, or reuse the whole record set as one value.

That makes this converter helpful for:

  • test fixtures
  • API examples
  • documentation
  • JSON viewers
  • schema validation
  • browser-based tools
  • small data cleanup jobs
  • copying records into JavaScript
  • turning logs into readable sample data

In practical terms, NDJSON is often good for machines and pipelines. JSON arrays are often better when humans need to read, review, or reuse the data.

How this converter works

This converter keeps the process intentionally simple:

  1. It splits your input into lines.
  2. It skips empty lines.
  3. It parses each non-empty line as JSON.
  4. If every non-empty line is valid JSON, it creates one JSON array.
  5. If any line is invalid, it shows the line number and parser error.

The converter does not silently drop invalid lines. If one line cannot be parsed, the output array is not created until the input is fixed.

That is intentional. A partial conversion can be useful sometimes, but it can also hide broken or missing records. This tool chooses the boring safe path. Tiny confetti cannon withheld.

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 convert it. The file is not uploaded to hluska.ca.

If you refresh or close the page, the current input and output are gone. That is intentional.

Want to test that?

After this page loads, turn off your internet connection and try using the converter. If it still works, that tells you the conversion is happening in your browser.

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

Converting NDJSON to JSON changes the shape of the data. It does not make the data safe to share.

Before sending converted 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 where appropriate, you will usually be better off copying only the records you need. Otherwise you're likely going to have a really bad day sometime in the future.

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.