CSV → SQL Server

Convert CSV to SQL Server SQL

Drop a CSV and get a ready-to-run CREATE TABLE + INSERT script for SQL Server — automatically batched to stay under the 1,000-row limit. Runs in your browser, nothing uploaded.

Drop or choose your file to start...
Choose a file...

T-SQL output

CREATE TABLE + INSERT statements built for Microsoft SQL Server.

Respects the 1,000-row limit

INSERTs are auto-batched at 1,000 rows so they don't error on import.

SQL Server types

Detects INT, BIGINT, DECIMAL, DATETIME2, BIT, and NVARCHAR from your data.

Millions of rows

Big files welcome — batched output imports cleanly into SQL Server.

Schema control

Override inferred types, rename columns, and set primary keys.

Private by design

Processed in memory, in your browser, never stored.

How to convert a CSV file to SQL Server

Loading a CSV into Microsoft SQL Server usually means BULK INSERT, bcp, or the Import Wizard — all of which need the file reachable from the server. SQLified takes a simpler route: drop your CSV and it writes a portable CREATE TABLE + INSERT script in T-SQL that you can paste straight into SSMS or Azure Data Studio.

  1. Drop your CSV onto the converter above (or click to choose a file).
  2. Review the schema. SQLified infers SQL Server types. Adjust any type, mark columns nullable, rename them, or set a primary key.
  3. Generate the SQL — a CREATE TABLE plus INSERT statements batched at 1,000 rows.
  4. Run it in SSMS, Azure Data Studio, or any T-SQL console.

The 1,000-row limit (and why most converters break here)

SQL Server enforces a hard rule: a single INSERT ... VALUES can contain at most 1,000 row-tuples. Paste 1,001 and you get “The number of row values in the INSERT statement exceeds the maximum allowed number of 1000.” Plenty of online converters happily generate one giant statement — which means their output simply won't import for anything but tiny files.

SQLified splits the output into 1,000-row batches automatically, emitting a fresh INSERT every 1,000 rows. So a million-row CSV becomes ~1,000 clean statements that run end to end — no manual splitting, no errors.

What the generated SQL looks like

CREATE TABLE [users] (
  [id] INT NOT NULL,
  [name] NVARCHAR(255) NOT NULL,
  [signup_date] DATETIME2 NOT NULL,
  [amount] DECIMAL(18,2) NOT NULL
);

INSERT INTO [users] ([id], [name], [signup_date], [amount]) VALUES
('1', 'Ada Lovelace', '2026-01-04', '120.50'),
('2', 'Alan Turing', '2026-02-11', '99.00');

Identifiers are bracket-quoted ([column]) per T-SQL convention, so reserved words and spaces are safe.

SQL Server type inference

  • Whole numbers → INT, or BIGINT beyond the 32-bit range.
  • Decimals → DECIMAL(18, n) sized to your data.
  • Dates and timestamps → DATETIME2.
  • true/falseBIT.
  • Text → NVARCHAR(255) (or wider as needed).

Override any column before generating — for example, forcing an ID to NVARCHAR to preserve leading zeros.

Frequently asked questions

Why does SQL Server reject large INSERT statements?

SQL Server caps a single INSERT ... VALUES at 1,000 row-tuples. A converter that dumps every row into one statement will fail on anything bigger. SQLified automatically splits the output into 1,000-row batches, so even a million-row file imports without that error.

Does SQLified upload my CSV?

No. The conversion runs entirely in your browser — the file is read into memory, turned into T-SQL, and never sent anywhere.

How does this compare to BULK INSERT or bcp?

BULK INSERT and bcp are fast but need the file accessible from the server and elevated permissions. SQLified's INSERT statements are portable — paste them into SSMS, Azure Data Studio, or any T-SQL console, which is ideal for Azure SQL and managed instances where file access is restricted.

Which SQL Server versions are supported?

The output works with modern SQL Server (2016+) and Azure SQL Database / Managed Instance. Identifiers are bracket-quoted ([col]) per T-SQL convention.

Can I change types or set a primary key?

Yes — SQLified infers SQL Server types from your data, and you can override any column's type, rename it, mark it nullable, or set a primary key before generating.