Published on

How to convert CSV to JSON in Node.js


Most of the time, file imports usually consists of CSV files.

And we need to process them in our application. However, converting them to JSON object gives us more flexibility than CSV string.

Let's see how to do that in Node.js

Install the Dependencies

npm install neat-csv


import neatCsv from "neat-csv";
const rawJson = await neatCsv(`CSV file's content as string here`);


Happy playing-with CSV!