Caxton
Features Benchmarks Pricing Docs How it works Changelog Support About Download Free
Guides
All guides Large File Text Editors EmEditor for Mac UltraEdit Alternatives Notepad++ Alternatives Notepad for Mac File Too Large for VS Code CSV Editor for Mac Open a CSV File CSV Viewer for Mac Edit CSV Without Auto-Formatting Repair a Malformed CSV Remove Duplicate Rows Validate a CSV Transform a CSV Column Fixed-Width to CSV Sort a Large CSV CSV Too Big for Excel Open a Huge CSV Log Viewer for Mac Open a 10 GB Log Filter Large Log Files Jump to a Time in a Log Find & Replace in Huge Files Find & Replace Across Files Compare Two Text Files Open a SQL Dump Fix Garbled Text & Encoding Convert Line Endings Open a GBK or Big5 File Open a Large JSON File Numbers File Too Large

How to open a CSV file on a Mac.

Someone sent you a .csv file and you want to look at it, or fix one thing in it. A Mac already has several ways to open it, and each shows the file a little differently. This guide walks through them in order, from a two-second peek to a full table, and says where each one changes what you see.

Download Caxton for Free · 7-day free trial of Caxton Pro, no credit card required · 7 MB · macOS 13.0+

The short answer

For a quick look, select the file in Finder and press the Space bar; Numbers opens it as a spreadsheet, and TextEdit shows the raw text, all free and already on your Mac. Caxton, a native Mac editor for text and data files, opens any CSV as a table and as text with every value exactly as the file has it, to view, search, filter and edit.

What is a CSV file?

A CSV file is plain text: one row per line, with the values in each row separated by commas, which is what the name stands for, comma-separated values. Any program that can read text can read it, which is why exports from banks, shops, databases and web services so often arrive this way.

What happens when you double-click a CSV file?

Double-clicking opens the file in whichever app your Mac has assigned to .csv files. On most Macs that is Numbers, Apple's spreadsheet app, and on a Mac with Microsoft Excel installed it is often Excel. Both are spreadsheets, and a spreadsheet does something a plain text view does not: it reads each value and decides what kind of thing it is. Apple's Numbers guide says that "By default, Numbers formats table cells automatically, so letters and numbers are formatted and appear the way you type them," and gives the example that a zip code with a leading zero "would normally treat it as a number and remove the leading 0 automatically." That is convenient for a spreadsheet you are building and a surprise when the file is someone else's data. The sections below say what each app does, so you can pick the one that fits the job.

This page is the how-to. To weigh the viewers against each other, cost, size limits and what each does to the values, see free ways to view a CSV file on a Mac.

Take a quick look without opening it

For a peek, you do not need to open the file at all. In Finder, select the CSV and press the Space bar. Apple describes Quick Look as "a fast, full-size preview of nearly any kind of file without opening the file": "select one or more items, then press the Space bar. A Quick Look window opens." Press the Space bar again to close it. Nothing is changed and nothing is launched, which makes it the right first move for a file you are not sure about.

Open a CSV in Numbers

Numbers opens a CSV as a new spreadsheet with the file's rows in a table. If the columns came out wrong, Apple's import page says to click the Table tab in the Format sidebar, "then click Adjust Import Settings," where you can "Select one or more delimiter options next to Separate Values Using, or enter a custom delimiter," choose the text encoding from "the Text Encoding pop-up menu," and "Click Update Table."

What Numbers does to the values is the part to know before you save. Its own documentation says that it "automatically interprets text strings that you type in a recognized date format as dates (for example, 6/10/17)," that "If you enter a value that contains a hyphen (-) or a slash (/), such as '1/4/2014,' Numbers assumes it's a date," and that a leading zero is normally removed. Product codes, phone numbers and long account numbers can all come out looking different from the file. Apple's guide also notes that "if your spreadsheet is over 500 MB, Numbers may perform better if you save the spreadsheet as a package." If the file is larger than Numbers wants to hold, when Numbers can't open your file covers what to do.

Open a CSV in Excel for Mac

Double-clicking a CSV with Excel installed opens it straight into a worksheet, with the same automatic reading of values. To keep a column as text, use the import route instead. Microsoft's page for Excel for Mac says to "Go to Data > Get & Transform Data > Get Data > From File," then "Select the type of file that you want to import (such as From Excel Workbook or From Text/CSV)," and to "select Transform Data" to open the Power Query Editor, where "You can define or change the data type of a column." Microsoft documents that this route is "generally available to Microsoft 365 subscribers, running Version 16.69 (23010700) or later of Excel for Mac." The Text/CSV connector's documentation adds that "You can also choose to turn off automatic data type detection and instead let all columns default to 'Text.'"

Excel also has settings for the conversions themselves. Microsoft's Automatic Data Conversion page lists them: "Removing leading zeros from numerical text and converting to a number," "Truncating numerical data to 15 digits of precision and converting to a number displayed in scientific notation," "Converting numerical data surrounding the letter "E" to scientific notation," and "Converting a continuous string of letters and numbers to a date." On a Mac they live under Excel ▸ Preferences ▸ Edit ▸ Automatic Data Conversion. Excel's documented worksheet size is "1,048,576 rows by 16,384 columns." Past that, CSV too big for Excel is the next guide.

See the raw text in TextEdit

When you want to see exactly what is in the file, commas and all, open it as text. Right-click the CSV in Finder, choose Open With, then TextEdit. TextEdit shows the lines as they are written, with no columns and no automatic formatting. It is the quickest way to check whether a file uses commas or semicolons, whether the first line is a header, and whether a value really has a leading zero. For a large export it is the wrong tool, because every line is shown as one long line and there is no table to read.

Open a CSV in Caxton, as a table and as text

Caxton is a Mac editor for text and data files, and a .csv, .tsv, .psv or .dsv file opens in it straight into a table. The table is a view of the file itself: nothing is imported, no spreadsheet is created, and every value is shown exactly as the file has it, leading zeros, long numbers and date-shaped text included. Here is the walk through an ordinary 200-row export.

1. Open the file

Drag the file onto Caxton, or use File ▸ Open. The table appears with the file's own header row across the top and the row numbers down the side; the status bar at the bottom reports the count, for example "200 rows × 8 columns," with the encoding and the line ending at its right end. Opening and viewing are Caxton Free.

2. Check that the columns are right

Caxton reads the separator from the file, so a semicolon or tab file comes up in columns too. If a file fooled it, CSV ▸ Delimiter lets you pick the separator yourself, and the table reparses. Caxton Free.

3. Switch to the plain text and back

The grid button in the toolbar, or View ▸ CSV Grid View (⇧⌘C), shows the same file as plain text, commas and all, and the same button brings the table back. One file, two views. Caxton Free.

4. Find a value

⌘F searches the whole file and counts the matches. Edit ▸ Find ▸ Filter Lines (⇧⌘L) shows only the rows that contain a word, and right-clicking a cell offers Filter to that value, so "only the rows for this customer" is one click. CSV ▸ Advanced Filter… adds a condition per column. Each filter is a view; the file is not touched. Caxton Free.

5. See what is in a column

Click a cell and press ⌃⌘7 for the Column Profile: the column's type, its blank and distinct counts, every value with how often it appears, and for a numeric column its minimum, maximum and mean. Caxton Free.

6. Make the small change

Select a cell, press Return, type the new value and press Return again; ⌘S writes the same file back with every untouched byte unchanged. Editing and saving are Caxton Pro, which every download includes as a 7-day free trial of Caxton Pro with no credit card required. After the trial, Caxton Free keeps opening, searching and filtering at any size, with no time limit.

A file of 300 MB or more opens through the Open Large File dialog first; pick Whole-File Virtual and the whole file is mapped and indexed in the background while you read. The manual's CSV workbench page has every control, and how to open a large CSV file on a Mac covers the big ones.

Why does my CSV look wrong when I open it?

  • Everything is in one column. The file uses a separator other than the comma, often a semicolon from a region where the comma is the decimal mark, and the app split on commas. In Numbers, use Adjust Import Settings; in Excel, the Text/CSV import; in Caxton, CSV ▸ Delimiter. Repair a malformed CSV covers the cases where the rows themselves are broken.
  • Strange characters, such as é where an é should be. The file is in one encoding and was read as another. Nothing is damaged. Fix garbled text and the wrong encoding shows how to read it the right way.
  • Leading zeros are gone, or a code became a date. That is automatic formatting in the spreadsheet, not the file. Edit a CSV without Excel changing the data shows how to hold it back, and a text view or Caxton's table shows the file as it is.

How to make CSV files open in Excel on a Mac

If Excel is installed but double-clicking a CSV still opens Numbers, change the default app. Apple's macOS guide gives the steps: "Select a file, then choose File > Get Info." In the Info window, click the arrow next to "Open with," then "Click the pop-up menu, choose an app, then click Change All." Choose Microsoft Excel, and from then on every .csv file double-clicks into Excel. The same steps assign Numbers, TextEdit or Caxton instead, and switch it back.

Double-clicking still lets Excel read the values its own way. When you need control over the column types, open Excel first and bring the file in through Data ▸ Get Data ▸ From File ▸ From Text/CSV, the route described above, where every column can default to Text and leading zeros and long numbers survive.

Open the CSV as a table, read every value as it is in the file, search and filter it, all free.

Download Caxton for Free

7-day free trial of Caxton Pro, every feature, no credit card required. After it, Caxton Free keeps opening, searching and filtering at any size.

Frequently asked questions

Can I open a CSV without Excel?

For a quick look, select the file in Finder and press the Space bar; Numbers opens it as a spreadsheet, and TextEdit shows the raw text, all free and already on your Mac. Caxton, a native Mac editor for text and data files, opens any CSV as a table and as text with every value exactly as the file has it, to view, search, filter and edit.

What if the CSV is too big for Numbers or Excel?

Excel documents a worksheet of 1,048,576 rows by 16,384 columns, and Apple notes that a Numbers spreadsheet over 500 MB may perform better saved as a package. A CSV past what either will hold still opens in Caxton as a table, straight from the file; a file of 300 MB or more goes through the Open Large File dialog first.

Is it safe to open a CSV in an online viewer?

An online viewer works by uploading the file to someone else's server, so it is the wrong choice for customer lists, financial exports or anything with personal data in it. Every app in this guide reads the file on your own Mac.

Will opening a CSV change the file?

Opening never changes the file. Saving can: a spreadsheet that formatted values on the way in writes them back formatted. Caxton shows every value exactly as the file has it and only writes when you save, and saving is Caxton Pro.

Sources