---
title: "Import a CSV File into SQL Server on a Mac"
description: "SSMS import wizards are Windows-only. From a Mac: BULK INSERT, bcp, VS Code or Jam SQL Studio, each tested with a 100,000-row CSV on SQL Server 2025."
url: "https://jamsql.com/blog/2026-11-10-import-csv-into-sql-server-mac/"
html_url: "https://jamsql.com/blog/2026-11-10-import-csv-into-sql-server-mac/"
generated: "2026-11-17T22:27:06.498Z"
---

Published: 2026-11-10

# Import a CSV File into SQL Server on a Mac

The SQL Server Import and Export Wizard and the Import Flat File wizard come with SSMS, which runs only on Windows, and Azure Data Studio, which many tutorials still use for this, was retired on February 28, 2026. From a Mac there are four ways left: `BULK INSERT` if you can put the file on the server’s own disk, `bcp`, which reads the file on your Mac but does not understand quoted CSV fields, the VS Code MSSQL extension’s **Import flat file**, which only creates new tables, and a desktop client that imports files, such as Jam SQL Studio. We tried them with the same 100,000-row CSV on SQL Server 2025: `BULK INSERT` loaded it in 0.26 seconds once the file was on the server, `bcp` rejected every row until we converted the file to tab-separated text, and Jam SQL Studio read it from the local disk, created the table and loaded it in about 6 seconds. Below are the commands, the exact errors and what each route does with bad rows. Everything ran on November 10, 2026 on a Linux x86-64 machine with SQL Server in Docker; the Mac-only parts are marked and sourced.

## What is Windows-only (as of November 2026)

-   **SSMS.** The [SSMS FAQ](https://learn.microsoft.com/en-us/ssms/faq) answers “Does SSMS run on macOS?” with “No. SSMS is available only for Windows.” The [system requirements](https://learn.microsoft.com/en-us/ssms/system-requirements) list 64-bit Windows 11 (including Arm64) and Windows Server.
-   **The SQL Server Import and Export Wizard.** Microsoft’s [page on starting it](https://learn.microsoft.com/en-us/sql/integration-services/import-export-data/start-the-sql-server-import-and-export-wizard) says “You can run the SQL Server Import and Export Wizard directly through SQL Server Management Studio (SSMS)”, and that outside SSMS you need `DTSWizard.exe`. Every way it lists to start the wizard is a Windows one.
-   **Import Flat File.** Also an [SSMS wizard](https://learn.microsoft.com/en-us/sql/relational-databases/import-export/import-flat-file-wizard). It copies a `.csv` or `.txt` file “to a new table”, “detects the data types based on the first 200 rows” and “uses encoding based on the system’s active code page.”
-   **Azure Data Studio** ran on macOS and had a flat-file import extension; the first video Google showed for this search on November 10, 2026 still uses it. Microsoft’s [retirement page](https://learn.microsoft.com/en-us/sql/tools/whats-happening-azure-data-studio) says “Azure Data Studio is retired as of February 28, 2026 and no longer receives updates or security fixes.” For “Import .txt and .csv files” it points to the MSSQL extension’s Import flat file and adds “Bulk insert and PowerShell are also available.”

## The test file and the table

We generated `orders.csv`: 100,000 rows, 5.7 MB (6,020,979 bytes), seven columns, UTF-8, a header row and LF line endings. The customer is written *Last, First* in double quotes, which is how a CSV writer stores a value that contains a comma, and 42,757 rows have an empty `note`:

```
order_id,order_date,customer,country,quantity,unit_price,note
1,2025-11-03,"Ivanova, Felix",Canada,16,363.96,
2,2025-11-23,"Novak, Sam",Italy,8,403.08,"Gift wrap, no invoice"
3,2026-07-13,"Kowalski, Sam",Poland,12,350.30,Leave at the door
```

A second file, `orders_dirty.csv`, has six rows with the problems real exports have: a day-first date (`31/12/2025`), a decimal comma (`"12,50"`), an empty quantity, a note with a line break and an escaped quote, and the name *Müller, Jürgen*. Both went into the same table in a database called `Sales`:

```sql
CREATE TABLE dbo.Orders (
    order_id   int            NOT NULL PRIMARY KEY,
    order_date date           NOT NULL,
    customer   nvarchar(100)  NOT NULL,
    country    nvarchar(50)   NOT NULL,
    quantity   int            NULL,
    unit_price decimal(10,2)  NOT NULL,
    note       nvarchar(400)  NULL
);
```

The server was `mcr.microsoft.com/mssql/server:2025-latest`, which on November 10, 2026 was SQL Server 2025 RTM-CU10 (17.0.5035.5). If you do not have a server yet, [How to Run SQL Server on a Mac](/blog/sql-server-on-macos/) covers the Docker setup on Apple silicon. To check that two routes loaded the same data, we compared the row count, `SUM(quantity)` (1,051,162), `SUM(unit_price)` (25,022,304.55) and a `CHECKSUM_AGG` over every column; for the table Jam SQL Studio created, which has its own column types, we used `EXCEPT` in both directions instead.

## 1\. BULK INSERT: fast, but the file has to be on the server

`BULK INSERT` is a T-SQL statement, so any client on the Mac can send it. The catch is in Microsoft’s [reference](https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql): “*data\_file* must specify a valid path from the server on which SQL Server is running.” A path on your Mac means nothing to the server:

```sql
BULK INSERT dbo.Orders FROM '/Users/me/Downloads/orders.csv'
WITH (FORMAT = 'CSV', FIRSTROW = 2);
```

```
Msg 4860, Level 16, State 1, Line 1
Cannot bulk load. The file "/Users/me/Downloads/orders.csv" does not exist or you don't have file access rights. See https://go.microsoft.com/fwlink/?LinkId=2374938 for more information.
```

For SQL Server in a Docker container on your own machine, copy the file into the container first. The copied files kept our user’s numeric owner and mode `0644`, which the container’s `mssql` user can read (a `0600` file is a different story; see [operating system error 5](/blog/2026-11-09-restore-sql-server-bak-docker-mac/#error-5) in our restore post):

```
docker exec sql2025 mkdir -p /var/opt/mssql/import
docker cp orders.csv sql2025:/var/opt/mssql/import/
```

```sql
SET STATISTICS TIME ON;
BULK INSERT dbo.Orders FROM '/var/opt/mssql/import/orders.csv'
WITH (FORMAT = 'CSV', FIRSTROW = 2);
```

```
 SQL Server Execution Times:
   CPU time = 183 ms,  elapsed time = 255 ms.

(100000 rows affected)
```

All 100,000 rows, with the same totals as the file, and the empty notes stored as `NULL`. For a server you do not run yourself, this route needs a folder that the SQL Server service account can read and you can write to, which a DBA has to set up. The reference also notes that on Linux only members of `sysadmin` could bulk insert before SQL Server 2022 CU24 and SQL Server 2025 CU3; we ran as `sa`. What we saw with the options that matter for CSV files:

-   **`FORMAT = 'CSV'` is what reads the quotes** (SQL Server 2017 and later; `FIELDQUOTE` defaults to `"`). With the older `FIELDTERMINATOR = ','` form, `"Ivanova, Felix"` was split into two fields and every row failed: `Msg 4864 … Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 5 (quantity).`
-   **`CODEPAGE` is refused on Linux:** `CODEPAGE = '65001'` gave `Msg 16202 … Keyword or statement option 'CODEPAGE' is not supported on the 'Linux' platform.` Without it, UTF-8 loaded correctly (*Müller, Jürgen* arrived intact), and a file with a UTF-8 byte-order mark loaded too, because the mark sits on the header row that `FIRSTROW = 2` skips.
-   **Bad rows do not stop it by default.** On `orders_dirty.csv` the statement printed two `Msg 4864` errors, one for `column 2 (order_date)` on the day-first date and one for `column 6 (unit_price)` on the decimal comma, and still inserted the other four rows, because `MAXERRORS` defaults to 10. With `MAXERRORS = 0` it inserted nothing and added `Msg 7399` and `Msg 7330` about the “BULK” OLE DB provider.
-   **`SET DATEFORMAT dmy;`** before the statement made `31/12/2025` load as December 31; the ISO dates in the same file still loaded correctly. Nothing we tried made `12,50` a decimal: fix it in the file.
-   **`ERRORFILE` is written on the server too.** `ERRORFILE = '/var/opt/mssql/import/orders_dirty.err'` produced the two rejected lines and a `.Error.Txt` file with their row numbers and file offsets, owned by `mssql` with mode `0660`, inside the container.

## 2\. bcp from the Mac: reads your file, but not quoted CSV

`bcp` is Microsoft’s command-line bulk copy tool. Unlike `BULK INSERT` it runs on the client, reads the file there and sends the rows over the connection, so the file never has to reach the server. Microsoft’s [macOS install page](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos) (dated September 19, 2026) installs it with the ODBC driver through Homebrew (Mac-specific; we did not run this on a Mac):

```
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew trust microsoft/mssql-release
brew update
HOMEBREW_ACCEPT_EULA=Y brew install msodbcsql18 mssql-tools18
```

The page says `brew trust` is needed on Homebrew 6.0 and later, which otherwise refuses formulas from a third-party tap, and is “safe to omit” on earlier versions. On Apple silicon, Microsoft’s wording is this: the [tools page](https://learn.microsoft.com/en-us/sql/linux/install-upgrade/setup-tools) says “`sqlcmd` and `bcp` are available in mssql-tools18 for `x64` and `arm64` architectures”, and the ODBC page says “Apple ARM64 (M1, M2, M3, and later Apple Silicon chips) support was added starting with version 17.8. The Homebrew formula detects the architecture and automatically installs the correct package.” Neither page says in so many words that `bcp` runs on an Apple-silicon Mac, and we have not run it on one.

We ran `bcp` 18.7.0001.1 on Linux in a separate container acting as the client, with the file only on the client side. `-u` trusts the server’s self-signed certificate, `-c` is character mode, `-t,` the field terminator and `-F 2` skips the header:

```
bcp Sales.dbo.Orders in orders.csv -S localhost,1433 -U sa -P '<password>' -u \
    -c -t, -r 0x0a -F 2 -e orders.err
```

```
Starting copy...
SQLState = 22005, NativeError = 0
Error = [Microsoft][ODBC Driver 18 for SQL Server]Invalid character value for cast specification
(the same two lines nine more times)

BCP copy in failed
```

Nothing was inserted: `bcp` gave up after ten errors, its default for `-m`. The error file shows why: `bcp` split `"Ivanova, Felix"` at the comma and kept the quotes, so the country landed in the quantity column:

```
#@ Row 1, Column 5: Invalid character value for cast specification @#
1	2025-11-03	"Ivanova	 Felix"	Canada	16	363.96,
```

`bcp` has no CSV or quote option; `FORMAT` and `FIELDQUOTE` exist only for `BULK INSERT` and `OPENROWSET`. Microsoft’s [bulk import guidance](https://learn.microsoft.com/en-us/sql/relational-databases/import-export/prepare-data-for-bulk-export-or-import-sql-server) puts it as “Data fields can’t contain the field terminator.” The practical fix is a terminator that does not occur in the data. We wrote a tab-separated copy with Python’s `csv` module and loaded that (tab is `bcp`’s default field terminator):

```
bcp Sales.dbo.Orders in orders.tsv -S localhost,1433 -U sa -P '<password>' -u -c -F 2
```

```
100000 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total     : 173    Average : (578034.69 rows per sec.)
```

Same totals and checksum as `BULK INSERT`, and *Müller* came through intact in character mode. A note with a line break would still break the tab-separated file, and, like `BULK INSERT`, `bcp` needs the table to exist before it runs.

## 3\. The VS Code MSSQL extension: Import flat file

The MSSQL extension for VS Code is Microsoft’s recommended replacement for Azure Data Studio and runs on macOS. Its [database operations page](https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/mssql/mssql-database-operations) (May 25, 2026) describes Import flat file as a feature that “creates a new SQL Server table and populates it with data from a structured text file”, for `.csv` and delimited or fixed-width `.txt` files, and says “File formats such as Excel (`.xlsx`), JSON, XML, or Parquet aren’t currently supported.” So it fits a one-off load into a new table. To add rows to a table that already exists, use one of the other routes. We did not run the extension for this post.

## 4\. Jam SQL Studio: Data Import from a file on your Mac

Jam SQL Studio reads the file on your Mac, so nothing has to be copied to the server, and it parses quoted CSV, creates the table if you want one and keeps going past bad rows if you ask it to. Data Import is marked **Beta** in the app. The steps:

### Get a client on the Mac

Jam SQL Studio has separate Apple Silicon and Intel builds for macOS 11 Big Sur or later. Run `uname -m` in Terminal if you are not sure: `arm64` means Apple Silicon.

[Download for Mac (Apple Silicon & Intel)](/download/mac/) [Data Import guide](/docs/import-data/)

### Connect and open the import

1.  Click **New Connection**, choose **SQL Server** and enter the server, port, *SQL Server authentication*, login and password. **Trust server certificate** is on by default, which a container’s self-signed certificate needs.
2.  Click **Save**. The app tests the connection before it saves it; then click **Connect** on the saved connection.
3.  Right-click the database in Object Explorer and choose **Import Data…**, or press `Cmd+I`, or drop the CSV onto the window.

### Source: check that the quotes were read

Pick the file. The delimiter, header row and encoding are detected and the first 100 rows are shown; the whole file is read to count the rows and infer the column types. In our file the quoted names stayed in one `customer` column:

![Jam SQL Studio Data Import Source step with orders.csv: CSV, UTF-8 detected, comma delimiter, first row as header, and a preview of 100 of 100,000 rows where the customer column holds Ivanova, Felix and Novak, Sam](/images/docs/data-import-csv-mac-source.png)
*The Source step: comma delimiter and UTF-8 detected, “Ivanova, Felix” in one column, 100,000 rows found.*

### Target: a new table or an existing one

Choose the connection, database and schema, then **Create new table** or **Add rows to existing table**. For a new table the app proposes SQL Server types from the data. For `orders.csv` it proposed `int`, `date`, `varchar(50)`, `decimal(5,2)` and a nullable `note`. The types are sized to this file, so widen them on the **Columns** step if later files may hold longer names or larger prices; the Columns step also lets you leave out columns or give a column a fixed value.

![Jam SQL Studio Data Import Target step: Company SQL Server connection, Sales database, dbo schema, Create new table named orders_2026, with a preview of the seven columns and their inferred types int, date, varchar(50), decimal(5,2)](/images/docs/data-import-csv-mac-target.png)
*The Target step: the table that will be created, with the inferred SQL Server types.*

### Import: the result

On the **Import** step choose the error policy and click the button that names what will happen, here **Create orders\_2026 & import 100,000 rows**. From the click to “Import completed — 100,000 rows imported” took 6.9 seconds in the first run and 5.9 seconds in the second, against 0.26 seconds for `BULK INSERT` reading the file on the server: the app sends the rows over the connection with the driver’s bulk-load call, 1,000 rows at a time. Row count, sums and every value matched the file; the empty notes were stored as `NULL`, as with `BULK INSERT` (the **Null values** box on the Source step lists what counts as NULL: an empty field and the text `NULL` by default). If you would rather run the SQL yourself, **Generate script instead of executing** produces the `CREATE TABLE` and `INSERT` statements to open in an editor tab or save as a `.sql` file.

For `orders_dirty.csv` we added to the existing `dbo.Orders` with **Skip invalid rows** selected. It inserted four rows and skipped two, the same two that `BULK INSERT` rejected (the day-first date and the decimal comma). The empty quantity became `NULL`, the note kept its line break and quotes, and *Müller* arrived intact. **Save error report** saves a CSV on the Mac with the row, column, value and reason for each skipped row. The other policy, **Stop at the first error**, rolls back the current transaction and reports the failing row.

![Jam SQL Studio Data Import summary: Import completed with 2 rows skipped, 4 inserted, and the buttons Open imported table, Save error report and Import another file](/images/docs/data-import-csv-mac-skipped.png)
*Skip invalid rows: four rows inserted, two skipped, with an error report to save.*

### The limits

-   **100,000 rows per import in the free Personal mode.** A file with 100,001 rows stopped as soon as we clicked **Create orders\_big & import 100,001 rows**, with “Import stopped. Importing 100,001 rows exceeds the 100,000 row limit for Personal mode. Upgrade to Pro for unlimited imports. No rows were committed.” The new table had not been created either. A row filter scoped to the import counts against the limit after filtering. Personal mode is for personal, non-commercial use; work use needs Pro, which also removes the limit ([pricing](/pricing/)).
-   **Excel workbooks up to 100 MB.** A larger `.xlsx` is refused with a message to save it as CSV; CSV files are read as a stream.
-   **Encoding** is detected from a byte-order mark; UTF-8 without one worked here, and other encodings (Windows-1252, Latin-1 and others) are picked by hand.

## Excel files

The T-SQL way to read a workbook, `OPENROWSET` with the `Microsoft.ACE.OLEDB` provider, needs SQL Server on Windows. On our Linux server it failed with `Ad Hoc Distributed Queries` both off and on:

```
Msg 7222, Level 16, State 255, Line 1
Only a SQL Server provider is allowed on this instance.
```

That matches Microsoft’s list of [features SQL Server 2025 on Linux does not support](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and-components-2025), which includes “Distributed query with third-party connections” and “Linked servers to data sources other than SQL Server”. And if your server runs on Windows, the provider would still read the file on the server, not on your Mac. So from a Mac: save the sheet as CSV and use any route above, or import the `.xlsx` in Jam SQL Studio, which has a sheet picker. [Import Excel into a SQL database: 3 ways](/blog/2026-08-25-import-excel-into-sql-database/) covers what Excel does to dates, leading zeros and long numbers before the file reaches you.

## Side by side

Route

Reads the file

Quoted fields

Table

Bad rows

100,000 rows, our run

`BULK INSERT`

On the server

Yes, with `FORMAT = 'CSV'`

Must exist

Up to `MAXERRORS` (default 10) skipped; `ERRORFILE` on the server

0.26 s

`bcp`

On your Mac

No; every row failed

Must exist

Up to `-m` (default 10); `-e` error file on the client

0.17 s (tab-separated copy)

VS Code MSSQL, Import flat file

On your Mac

Not tested

New table only

Not tested

Not tested

Jam SQL Studio, Data Import (beta)

On your Mac

Yes

New or existing

Stop and roll back, or skip and save an error report

5.9–6.9 s; 100,000 rows per import in Personal mode

For a large file on a server you control, `BULK INSERT` is the fastest. For a file that is only on your Mac, it comes down to whether the file has quoted fields and whether the table exists yet.

## Quick Answers

### Q: Can I use the SQL Server Import and Export Wizard on a Mac?

A: No. The wizard runs from SQL Server Management Studio or from DTSWizard.exe, and Microsoft's SSMS FAQ says SSMS is available only for Windows. Import Flat File is also an SSMS wizard. Azure Data Studio, which had a flat-file import extension, was retired on February 28, 2026. On a Mac, use BULK INSERT, bcp, the VS Code MSSQL extension's Import flat file, or a desktop client that imports files.

### Q: Why does BULK INSERT say the file does not exist or I don't have file access rights?

A: BULK INSERT reads the file on the server, not on your Mac. A path such as /Users/me/Downloads/orders.csv is looked up on the SQL Server machine and fails with Msg 4860. Copy the file to a folder the SQL Server service can read (for a Docker container, docker cp it into the container) or use a tool that reads the file on your Mac, such as bcp or a desktop client.

### Q: How do I import a CSV that has commas inside quoted fields?

A: With BULK INSERT, add FORMAT = 'CSV' (SQL Server 2017 and later), which reads RFC 4180 quoting; without it a quoted value such as "Ivanova, Felix" is split and the row fails with Msg 4864. bcp has no CSV mode: in our test every row of such a file failed. Convert the file to tab-separated text for bcp, or use a client that parses quoted CSV.

### Q: Does bcp run on an Apple silicon Mac?

A: Microsoft says sqlcmd and bcp are available in mssql-tools18 for x64 and arm64, installed on macOS with Homebrew from the microsoft/mssql-release tap, and that the ODBC driver supports Apple ARM64 from version 17.8. Microsoft's pages do not say in so many words that bcp runs on Apple silicon, and we ran bcp 18.7 on Linux, not on a Mac.

### Q: How do I import an Excel file into SQL Server from a Mac?

A: The OPENROWSET route with the Microsoft.ACE.OLEDB provider needs SQL Server on Windows: on SQL Server 2025 on Linux it fails with Msg 7222, Only a SQL Server provider is allowed on this instance. Save the sheet as CSV and use one of the CSV routes, or use a client that reads .xlsx files. The VS Code MSSQL extension's Import flat file does not take Excel files.

### Q: Is there a row limit when importing a CSV into SQL Server?

A: BULK INSERT and bcp have no row limit of their own. Jam SQL Studio's Data Import, which is in beta, imports up to 100,000 rows per run in the free Personal mode; a larger run is stopped before anything is written. Pro removes the limit.

## How we tested

All commands ran on November 10, 2026 on an x86-64 Linux machine with Docker, against a throwaway `mcr.microsoft.com/mssql/server:2025-latest` container (SQL Server 2025 RTM-CU10, 17.0.5035.5, Enterprise Developer edition) that we removed afterwards. `bcp` 18.7.0001.1 ran from a second container from the same image, connecting over the network as a client would. The CSV files were generated with a fixed random seed. The Jam SQL Studio runs used a test build of the current code in Personal mode against the same server; the screenshots come from those runs. Timings are single runs on one machine and will differ on yours. We did not run any step on a Mac: the Homebrew install and the Apple-silicon statements come from the Microsoft pages linked above, and the VS Code extension’s import is described from Microsoft’s documentation.

## Summary

SSMS’s import wizards do not run on macOS and Azure Data Studio is retired. If the CSV can be copied to the server, `BULK INSERT … WITH (FORMAT = 'CSV', FIRSTROW = 2)` is the fastest route, but leave out `CODEPAGE` on Linux and watch the default `MAXERRORS` of 10. `bcp` reads the file on your Mac but needs a terminator that does not occur in the data, so convert quoted CSV to tab-separated text first. VS Code’s Import flat file creates new tables from `.csv` and `.txt`. Jam SQL Studio imports CSV and Excel from the Mac into new or existing tables and lists the rows it skipped, up to 100,000 rows per import for free.

Last verified against learn.microsoft.com, and by running every command and statement on SQL Server 2025 CU10, on 2026-11-10.

### Import CSV and Excel files into SQL Server from your Mac

Jam SQL Studio reads the file on your Mac, creates the table or adds to an existing one, and saves the rows it skipped to an error report. Native builds for Apple Silicon and Intel.

[Download for Mac](/download/mac/) [Data Import guide](/docs/import-data/)

### Related

-   [Data Import Guide](/docs/import-data/)
-   [Import Excel into a SQL Database](/blog/2026-08-25-import-excel-into-sql-database/)
-   [Copy a SQL Server Database to Your Mac](/blog/2026-11-10-copy-sql-server-database-to-mac/)
-   [How to Run SQL Server on a Mac](/blog/sql-server-on-macos/)
-   [CSV to SQL Converter](/tools/csv-to-sql/)

## Import CSV and Excel files into SQL Server from a Mac

Jam SQL Studio runs natively on Apple silicon and Intel Macs. Its **Data Import** reads a CSV, TSV, Excel or JSON file from your Mac, creates the table or adds to an existing one, and lists the rows it could not import. Free for personal use, up to 100,000 rows per import.

[Download Jam SQL Studio Free](/download/) [Data Import guide](/docs/import-data/)

Free for personal use • No account required • Mac, Windows, Linux

![Jam SQL Studio Data Import Target step creating the table orders_2026 with column types inferred from the CSV](/images/docs/data-import-csv-mac-target.png)