CSV files: How do they work? And should you still use them?

Table of Contents

In a world of APIs, automation, and structured data formats, the humble CSV file has stood the test of time. Short for Comma-Separated Values, CSV files are simple text files that store tabular data in a readable, editable format. Whether you’re exporting contacts from a CRM or importing product data into a spreadsheet, you’ve likely dealt with one.

What is a CSV file?

A CSV file (Comma-Separated Values file) is a plain text document used to store data in a structured table-like format. Each line in the file corresponds to a row in the table, and each data field is separated by a comma — hence the name.
For example:

graphql
CopyEdit
Name,Email,Age
Jane Doe,jane@example.com,30
John Smith,john@example.com,45

This format allows easy storage and transfer of structured data, especially when working between applications that may not share a native format.For instance, developers often need to convert CSV to JSON when moving data into web apps or APIs that use hierarchical structures.

CSV files typically carry a .csv file extension and are compatible with almost every spreadsheet tool or database system. You may also see them referred to as a comma delimited file, comma separated file, or CSV document — all pointing to the same concept.

What a CSV file format looks like

At its core, the CSV format is extremely simple. Here’s how it works:

  • Rows: Each line of text represents one row of data.
  • Columns: Each field (column) is separated by a comma.
  • Headers: Most CSV files start with a header row defining column names.
  • Delimiters: While the standard separator is a comma, some files may use semicolons, tabs, or pipes — though these technically fall outside the strict CSV definition.

perl
CopyEdit

"Jane Doe","jane@example.com","30","London, UK"

Note how quotes are used to contain a field that includes a comma — a small but important formatting consideration.

Understanding the CSV file structure is crucial if you’re handling data across multiple systems or creating automated scripts to parse data.

Is a CSV file the same as a comma-delimited file?

Yes — “comma-delimited file” is simply another way to describe a CSV file. However, the term “delimited” refers to the general concept of separating data fields using a character. While CSVs use commas, other formats might use:

  • Tabs (.tsv)
  • Semicolons (common in European CSVs)
  • Pipes (|) (often used in log files)

When importing or exporting data, always check which delimiter the system expects — otherwise, your file might not parse correctly.

Benefits of using CSV files

Despite its simplicity, the CSV file format offers several powerful advantages:

  • Lightweight: CSVs are compact and quick to load, even with large datasets.
  • Human-readable: You can open and understand a CSV file with any text editor.
  • Tool-agnostic: From Excel to Python, most platforms support CSV without conversion.
  • Editable: Anyone can edit a CSV with basic tools.
  • Open format: Unlike proprietary spreadsheet files, CSVs don’t require specific software to access or share.

These benefits make CSV files incredibly useful for quick data transfers, audits, testing, and integrations.

Types of software that use the CSV file format

CSV’s simplicity and flexibility make it a default choice for a wide range of tools across business functions and technical environments. Here’s a deeper look at where and how CSVs are used:

Spreadsheet applications

  • Microsoft Excel and Google Sheets both support opening, editing, and exporting CSV files. You can use filters, formulas, and visualisations — just keep in mind that these will be lost if saved back as CSV.
  • LibreOffice Calc and Numbers (Mac) also handle CSVs well, offering full compatibility.

CRM systems

  • Platforms like Salesforce, HubSpot, Zoho CRM, and Pipedrive allow users to import and export CSV files for managing contacts, deals, campaigns, or account records.
  • CSV is the most common import/export format for onboarding customer data.

ERP and accounting systems

  • SAP, Oracle NetSuite, and QuickBooks use CSVs to import bulk transaction data, inventories, and general ledger entries.
  • This makes CSV the easiest way to batch-load or update records.

Databases

  • Tools like MySQL, PostgreSQL, and SQLite support direct import/export of CSV files using commands like LOAD DATA INFILE or COPY FROM.
  • CSV is also used as a lightweight format for backing up data or seeding development environments.

Data analytics and BI tools

  • Power BI, Tableau, Google Data Studio, and Looker accept CSV uploads for building dashboards and visualisations.
  • Analysts often clean or model CSV files before feeding them into visualisation platforms.

Programming languages and automation tools

  • Python (csv, pandas), R (readr, data.table), JavaScript, and even Excel VBA include libraries for reading, writing, and transforming CSV files.
  • CSV is also widely used in automation tools like Zapier, Make (Integromat), and Power Automate.

APIs and data platforms

  • Many open data platforms, such as data.gov.uk, offer datasets in CSV format.
  • APIs sometimes return data in CSV when JSON or XML isn’t required, especially for bulk downloads.

In short: if your tool works with data, it probably works with CSV files — making them the glue between platforms, teams, and departments.

Why use CSV files in business and tech?

CSV files continue to play an important role in modern workflows because they act as a universal bridge between tools and teams.

  • Data transfer: Export data from one system and import it into another.
  • System integration: Many APIs and ETL pipelines still use CSV as a simple file exchange format.
  • Record keeping: Archiving transaction logs or performance reports in CSV is still common.
  • Quick analysis: Need to spot-check trends in Excel? A CSV file is the easiest way to start.

Use cases for CSV files

CSV files show up in a wide range of everyday business tasks, such as:

  • E-commerce: Uploading or downloading product catalogues with pricing and inventory levels.
  • Finance: Importing bank statements or expense records into bookkeeping systems.
  • Marketing: Exporting lead lists from platforms like Mailchimp or LinkedIn Ads.
  • Open data: Governments and institutions use CSV to publish accessible, standardised datasets.
  • Scientific research: Sharing clean, structured experimental data for peer review or replication.

The simplicity of the comma separated values format makes it a default choice for many ad hoc data tasks.

How to create a CSV file

Creating a CSV file is easy, whether you’re doing it manually or exporting from software.

Option 1: Excel or Google Sheets

  1. Enter your data in rows and columns.
  2. Select File > Download As > Comma-separated values (.csv) or Save As > .csv.
  3. Make sure your delimiter is a comma (not a semicolon or tab).

Option 2: Text editor (like Notepad++ or VS Code)

  1. Enter values separated by commas.
  2. Use quotation marks around values with commas.
  3. Save the file with a .csv extension.
  4. Set encoding to UTF-8 to avoid character issues.

Creating a comma separated values CSV is a quick and repeatable way to build portable datasets.

How to open and edit a CSV file

One of the biggest advantages of CSV files is how easy they are to open and edit using a variety of tools — both online and offline.

Open a CSV file

You can open a CSV file in several ways:

  • Spreadsheet software: Microsoft Excel, Google Sheets, and LibreOffice Calc will automatically detect CSV files and present the data in a table format. You may be prompted to confirm delimiter settings if the file doesn’t use commas.
  • Text editors: Apps like Notepad++, Sublime Text, VS Code, or even basic Notepad can open CSV files. This is useful when you want to check raw formatting, encoding, or delimiter issues.
  • Browser-based tools: Many websites and cloud platforms (e.g. Zoho Sheet, Airtable, or CSV viewers) allow you to preview CSV content without installing anything.

Edit a CSV file

Editing a CSV is just as straightforward:

  • In a spreadsheet: You can modify values, add or remove rows/columns, sort data, or perform basic calculations. Just remember to “Save As” CSV to retain the correct format — otherwise it may default to XLSX.
  • In a text editor: Ideal for simple edits, batch replacements, or debugging import issues. Just be careful with formatting — every comma counts.
  • With code: Use scripts in Python (via pandas or csv libraries) or R (readr, data.table) for large-scale edits, validations, or transformations.

Formatting tips

  • Excel quirks: Watch out for automatic formatting — Excel may strip leading zeroes (e.g. in postal codes), reformat dates, or convert long numbers into scientific notation.
  • Quotes and commas: If your data includes commas (e.g. a location like “Manchester, UK”), wrap the field in double quotes: “Manchester, UK”.
  • UTF-8 encoding: Always save your file using UTF-8 encoding to prevent special characters from breaking — especially with names, currency symbols, or accented characters.

How to import CSV files into software or systems

Most modern tools allow users to import CSV data directly. The process usually includes:

  1. Uploading the .csv file.
  2. Mapping columns to fields (e.g. “Name” to “First Name”).
  3. Choosing delimiters (comma, semicolon, tab).
  4. Confirming the header row and previewing results.

Common platforms that support CSV imports:

  • CRMs and ERPs: Salesforce, HubSpot, Microsoft Dynamics
  • Databases: MySQL (via LOAD DATA INFILE), PostgreSQL (COPY FROM)
  • Python: Using pandas.read_csv() for analysis
  • Data visualisation tools: Power BI, Tableau

If your source data is in a text file format, you may want to convert txt to Excel before beginning your import.

Other file formats used in spreadsheets

While CSVs are versatile, they’re far from the only format used for handling spreadsheet data. Here are some alternatives — each with their own strengths and use cases:

  • XLS/XLSX: These are Excel’s native file formats. They support advanced spreadsheet features like formulas, pivot tables, conditional formatting, charts, data validation, and macros — things a plain CSV cannot do.TSV (Tab-Separated Values): Similar to
  • CSV, but uses tabs instead of commas to separate values. A good choice when data fields contain commas, such as addresses or product descriptions.
  • ODS (OpenDocument Spreadsheet): An open-source format used by LibreOffice and OpenOffice. Offers similar functionality to Excel but is fully open and ISO-standardised.
  • JSON (JavaScript Object Notation): A text-based format designed for structured, nested data. Often used in APIs and web development — but less human-readable for spreadsheet-style data.
  • XML (eXtensible Markup Language): Similar to JSON but uses a tag-based structure. Often found in data exchange between large systems and for storing metadata alongside content.
  • Google Sheets (GSheet format): A cloud-native spreadsheet format used in Google Drive. Offers real-time collaboration, sharing, and add-ons — but requires conversion to export into CSV or Excel.
  • Parquet: Used in big data environments (like Hadoop or Spark), this binary, column-oriented file format is optimised for large datasets and fast queries — but not editable via standard spreadsheet tools.
  • Feather / Arrow: Designed for high-speed data analytics and in-memory workflows (especially in R and Python), these aren’t readable by spreadsheet software, but are increasingly popular in data science pipelines.

Each format has its strengths depending on what you need: rich formatting, speed, openness, or support for complex data structures. CSV remains the go-to for quick, flat, and compatible data exchange.

Conclusion

So, should you still use CSV files? Absolutely — in the right contexts. For lightweight, portable, and tool-agnostic data exchange, the CSV file format is hard to beat. It’s simple enough for beginners to understand, yet powerful enough to drive enterprise workflows.

That said, it does have limitations. CSVs don’t support formulas, styles, or nested data structures. If your needs are more complex, consider formats like JSON, XML, or Excel’s native formats.

Still, the next time you need to export a report, upload contact lists, or migrate data between platforms, the comma-separated values file is likely to remain your go-to.

Check out our latest resources

How to convert CSV to JSON

If you're working with APIs, apps, or NoSQL databases, chances are you've come across the need to convert a CSV file into a JSON format. CSV to JSON conversion is...
Scroll to Top