Development,  Tech Tips

Quick Script: Convert a CSV file to a SQLite database file

Updated on October 4, 2025 to detect INTEGER/REAL/TEXT column types.

Here’s a quick bash script to convert a .csv file into a .sqlite file so you can query your CSV data in tools like TablePlus.

The file size is only slightly larger than the original CSV, and you can share it (it’s just a file!).

Just create the file csv-to-sqlite  somewhere in your PATH and chmod +x csv-to-sqlite  to make it executable.

As a side note, you can use something like dsq to query a csv file. I’ve stopped using that for this particular task.

Leave a Reply

Your email address will not be published. Required fields are marked *