Data and JSON tools Free · No sign-up · No upload

Convert JSON to NDJSON

Write a JSON array as newline-delimited JSON with one compact record per line, saved as a .ndjson file. It runs in your browser, so your records never leave your device.

  • Free to use
  • Local processing
  • Saves as .ndjson
  • One record per line
Your data
  • Runs on your device. Files are never uploaded.
  • Free and unlimited. No sign-up, no watermark.
Private: processed in your browserNo upload waitIN: JSON → OUT: NDJSON
How was JSON to NDJSON?
How it works

JSON to NDJSON in three steps

No account, no email, no waiting for an upload.

  1. STEP 01

    Paste or open your JSON

    Provide an array of records, or a single object.

  2. STEP 02

    Convert

    Each array item is written as compact JSON on its own line. There are no options to set.

  3. STEP 03

    Copy or download the .ndjson file

    The note shows how many lines were written.

What you get

What JSON to NDJSON does, and what it doesn't

We'd rather tell you up front than surprise you after the download.

What you get

  • Extension that matchesThe download is named with .ndjson, which some tools and upload forms require.
  • Compact recordsWhitespace between tokens is removed so each record sits on a single line.
  • Any array itemObjects are typical, but strings, numbers and nested lists are also written as lines.
  • Single objects tooAn object that is not inside a list becomes a file with one line.
  • Instant line countCheck the count against your source so you know nothing was dropped.

Good to know

  • Input must be one valid JSON documentIf the file already has one record per line, go back with NDJSON to JSON.
  • Bulk APIs may need extra linesSome bulk endpoints, such as Elasticsearch, expect an action line before each record. Add those lines yourself.
  • Very large inputsSize is limited by your device's memory. Split giant arrays first.
Private by design

Your data never leave your device

The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.

Typical online tool upload

Your device→Their server→Your device

Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.

Mediaextractr no upload

Your device does all the work

The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.

Made for real work

When people use JSON to NDJSON

Prepare a bulk import

Many search and analytics systems ingest NDJSON.

Create streaming fixtures

Test a line-by-line reader with realistic data.

Export logs in a friendly shape

Append-only files are easy to grow and split.

Hand data to a pipeline

Tools like jq, Unix utilities and data frames read it line by line.

Compare

Mediaextractr vs typical upload tools

MediaextractrPrivateTypical upload tools
Your file is uploadedNeverYes
Sign-up neededNoOften, after a few files
Daily file limitNoneOften 1–2 free files
WatermarkNeverSometimes
Wait for upload & downloadNoYes
Speed on very large filesDepends on your deviceDepends on their servers

What NDJSON is

NDJSON stands for newline-delimited JSON. Each line holds one complete JSON value, and lines are separated by a line feed. There is no outer array and no commas between records.

The idea is simple but useful. A program can read, process and discard one line at a time, so it never needs the whole file in memory.

NDJSON, JSONL and JSON Lines

These names describe the same layout. The differences are mostly the file extension and the spec page a project links to. This page writes .ndjson. If a tool expects .jsonl, use JSON to JSON Lines.

Using NDJSON in practice

Most readers expect a final line feed and UTF-8 text without a byte order mark. For Elasticsearch bulk requests, add an action line such as an index instruction before each record. For streaming parsers, check that no record contains raw line breaks inside strings, which this converter always escapes.

FAQ

Questions, answered

How do I convert a JSON array to NDJSON?

Paste the array. Each item is written as one compact line, and you can copy or download the .ndjson file.

Is NDJSON the same as JSONL?

They describe the same line-per-record format. Only the file extension and naming differ.

Are my records uploaded while converting to NDJSON?

No. Every line is written by script in your own browser tab.

Can I use the file for Elasticsearch bulk?

The records are ready, but its bulk API also needs an action line before each record, which you must add.

What if my input is not a list?

A single object or value becomes one line.

Does it work in an Android or iOS browser?

Yes, in current Chrome and Safari, with the usual memory limits for very large input.