json2jsonl

Convert JSON files to JSONL — pipe-friendly, single binary

A tiny Go CLI that turns one or many JSON files into a single JSONL (JSON Lines) stream. Output goes to stdout by default so it composes cleanly with grep, jq, and the rest of your Unix toolbox.

json2jsonl data1.json data2.json > out.jsonl
CLI · Go · v1.0.0 · macOS · Linux · Windows

One tool, the way Unix wants it.

Stdin to stdout, files to files, a pipe to whatever's next. No config, no plugins, no surprises.

Synopsis

The whole interface, on one line.

json2jsonl [options] <file1.json> <file2.json> ...

  -o string   write output to this file instead of stdout
  -h          print this help

Pipe into anything

Default output goes to stdout — compose with the rest of your toolbox.

json2jsonl events-*.json | grep '"level":"error"' | wc -l

json2jsonl users.json | jq -c 'select(.active == true)'

cat huge.json | json2jsonl - | head -100

Batch many files

Concatenate any number of inputs into a single ordered stream.

# Combine a directory of JSON files into one .jsonl
json2jsonl -o all.jsonl logs/2026-*.json

# Same idea, glob expanded by the shell
json2jsonl -o all.jsonl logs/*.json

Write to a file

Use -o when you want a file on disk.

json2jsonl -o output.jsonl data1.json data2.json
# → output.jsonl  (one JSON object per line)

Download v1.0.0

Grab the binary for your OS — extract, drop into /usr/local/bin (or anywhere on PATH), done.

Or build from source — see the GitHub repo.

Built to disappear into your shell

Single-purpose, single binary, single-line interface — exactly the shape a CLI should be.

Pipe-friendly by default

No output flag? Output goes straight to stdout. Compose with grep, jq, awk, or anything else in your shell — no temp files, no ceremony.

Batch in one command

Pass any number of input files. The tool concatenates each file as one or many JSONL records into a single ordered stream.

Pre-built binaries

Single static binary for the four major desktop targets — macOS Apple Silicon, macOS Intel, Linux x86_64, Windows x86_64. No Go toolchain required.

Fast and small

Written in Go. Launches instantly, processes large inputs without bloating memory. Drop it into a CI step without thinking about it.

Two flags, that's it

-o writes to a file instead of stdout. -h prints help. The whole interface fits in your head.

Free, MIT-style

Free to use for any purpose, source code on GitHub. No telemetry, no licence dance.

Drop it in a CI step

One static binary, no runtime, no config file. Pipe your way to JSONL and get on with the rest of your job.