Work With CSV and JSON Using Miller
Filter, transform and convert tabular data with a single tool.
Run printf 'a,b\n1,2\n' | mlr --icsv --ojson cat to convert CSV to JSON.
01Command
Command
$ printf 'a,b\n1,2\n' | mlr --icsv --ojson cat02What it does
Miller treats CSV, TSV, JSON and other formats as streams of records with named fields, offering verbs such as cut, filter, sort, stats1 and join. Format flags let you mix input and output formats freely, which is why it is nicknamed the 'awk for names data'.
03Risk
!Warning: Field names with special characters or whitespace may need quoting in expressions; test on a sample first.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: millerEvidence: Like sed, awk, cut, join & sort for name-indexed data such as CSV. Packages Miller (mlr), a tool for manipulating CSV, TSV and JSON records.
Last verified: 2026-09-22 · Category: Developer