DEV Community

Bobo
Bobo

Posted on

csv-toolkit: The CSV/Excel Swiss Army Knife You Didn't Know You Needed

Why Another CSV Tool?

There are a thousand CSV parsers in Node.js. So why build another one?

Because I got tired of writing the same 20-line script every time someone asked me to "just merge these 12 CSV files" or "remove duplicates from this export."

csv-toolkit-pro is the CLI tool I wish existed: one command, zero config, and it just works.


Quick Start

npx csv-toolkit-pro merge file1.csv file2.csv -o merged.csv
npx csv-toolkit-pro clean messy.csv --dedup --strip-whitespace
npx csv-toolkit-pro analyze sales.csv --stats
npx csv-toolkit-pro convert data.csv --to json
Enter fullscreen mode Exit fullscreen mode

Install once, use everywhere:

npm install -g csv-toolkit-pro
Enter fullscreen mode Exit fullscreen mode

What It Does

Merge

Combine multiple CSVs with matching columns into one file. Handles encoding, header mismatches, and large files (100k+ rows) without breaking a sweat.

Clean

  • Remove duplicate rows
  • Strip whitespace and fix encoding
  • Filter by column values
  • Fill missing values
  • Normalize date formats

Analyze

  • Column statistics (min, max, avg, count, nulls)
  • Value distribution
  • File size and row count
  • Export summary as JSON

Convert

  • CSV → JSON
  • CSV → Markdown table
  • CSV → Excel (.xlsx)
  • JSON → CSV

Why Use It?

Task Without csv-toolkit With csv-toolkit
Merge 5 CSVs 30 min (write script) 3 seconds
Clean export data 15 min (Excel + formulas) 2 seconds
Analyze sales data 20 min (pivot table) 5 seconds
Convert to JSON 10 min (write code) 2 seconds

Excel Support

Version 1.1+ includes full .xlsx support:

csv-toolkit-pro convert data.xlsx --to csv
csv-toolkit-pro merge data.xlsx report.csv -o combined.xlsx
Enter fullscreen mode Exit fullscreen mode

Installation

# Global install
npm install -g csv-toolkit-pro

# Or use without install
npx csv-toolkit-pro --help
Enter fullscreen mode Exit fullscreen mode

Links

More Resources

  • 🛠️ My tools & open-source projects: GitHub
  • 📝 Blog & updates: TucaoWall
  • ☁️ Deploy your own cloud server and get $25 credit: DigitalOcean
  • 🐙 CLI Toolkit Pro (bundle of all my CLI tools): npm
  • 💼 Hire me on Freelancer: a0982

Top comments (0)