Convert Excel, CSV, JSON and database dumps to SQL
Turn a spreadsheet, CSV or JSON file into a table with the right types. Or convert a whole database into a script for another one, with its keys, indexes and rows.
- Converted on your computer
- No account needed
- Every change reported
4 rows converted, 10 fixes, none rejected
| Row | ||||||
|---|---|---|---|---|---|---|
| 5 | 00127 | Peña Muñoz | 01234 | 03/02/2024 | sí | 1.234,50 |
| 6 | 00128 | José Ángel | 09870 | 15/02/2024 | no | N/A |
| 7 | 00129 | Zoë Ortíz | 44100 | 29/02/2024 | sí | -12,00 |
| 8 | 00130 | Ñuño Castañeda | 06700 | 11/03/2024 | no | 980,75 |
-- Written by IntoSQL for PostgreSQL.
SET client_encoding = 'UTF8';
BEGIN;
CREATE TABLE clientes_2024 (
no_cliente text NOT NULL,
nombre text NOT NULL,
c_p text NOT NULL,
alta date NOT NULL,
activo boolean NOT NULL,
saldo numeric(6,2)
);
COMMENT ON COLUMN clientes_2024.no_cliente IS 'Nº Cliente';
COMMENT ON COLUMN clientes_2024.c_p IS 'C.P.';
INSERT INTO clientes_2024 (no_cliente, nombre, c_p, alta, activo, saldo) VALUES
('00127', 'Peña Muñoz', '01234', '2024-02-03', TRUE, 1234.50),
('00128', 'José Ángel', '09870', '2024-02-15', FALSE, NULL),
('00129', 'Zoë Ortíz', '44100', '2024-02-29', TRUE, -12.00),
('00130', 'Ñuño Castañeda', '06700', '2024-03-11', FALSE, 980.75);
COMMIT;
Fixes
- The header is on row 4; the rows above it were left out.
- Row 9 ("TOTAL") is a total, so it was left out.
- Column "Nº Cliente" is named no_cliente so PostgreSQL reads it without quotes.
- Column "C.P." is named c_p so PostgreSQL reads it without quotes.
- Leading zeros kept in "Nº Cliente": 00127 stays 00127, stored as text.
- Leading zeros kept in "C.P.": 01234 stays 01234, stored as text.
- 15/02/2024 proves the dates in "Alta" are day-first, so 03/02/2024 is read as 2024‑02‑03.
- "Activo" holds yes and no words (sí, no), stored as boolean.
- Numbers in "Saldo" use a decimal comma: 1.234,50 is read as 1234.50.
- N/A in "Saldo" read as empty (1 of 4 values).
Your file is converted on this computer and never uploaded.
Other samples:
Convert a file, or a whole database
Files to SQL
Drop an Excel, CSV or JSON file and get a CREATE TABLE with a type for each column, the INSERT statements and a report of every value it fixed.
- Every database pair
Database to database
Drop a dump from MySQL, MariaDB, PostgreSQL, SQL Server or Oracle, or a SQLite .db file, and get one script for another database with the same tables, keys, indexes and rows.
Five things that break file imports, and how IntoSQL handles them
Spreadsheets and exports carry habits that databases don't share. These five break imports most often. IntoSQL handles each one and lists it in the report, with the row and column it touched.
| In the file | Imported as is | Converted by IntoSQL |
|---|---|---|
| ZIP code 01234 | Imported as is: Read as the number 1234 | Converted by IntoSQL: Kept as 01234, stored as text |
| A CSV saved by Excel on Windows | Imported as is: Peña arrives as Peña, or the import stops | Converted by IntoSQL: Encoding detected, accents intact |
| Header on row 4, under a title | Imported as is: The title becomes the column names | Converted by IntoSQL: Header found, the rows above it left out |
| Decimal comma: 1.234,50 | Imported as is: Stored as text, or as 1.234 | Converted by IntoSQL: Read as 1234.50 |
| 03/02/2024 in a day-first file | Imported as is: Read as March 2 | Converted by IntoSQL: February 3, because 15/02/2024 is in the same column |
What a database conversion keeps and reports
The converter reads the dump file itself, without a database server, and writes one script for the target database.
Kept in the script
- Tables and columns, each with the closest type the target has
- Primary, unique and foreign keys, indexes, defaults and identity columns
- Every row, with counters continuing where the dump left them
Listed in the report
- Values the target can't hold, such as a 0000-00-00 date in PostgreSQL
- Types the target doesn't have, such as ENUM, with the type each one became
- Views, triggers and procedures, by name, since each database writes them in its own language
Every conversion, with its own page
Rows are what you have, a file or a database dump; columns are the database it goes to. Each dot opens a converter with its own page: the script it writes, how to load it and how every type maps.
- Excel
- CSV
- JSON
- MySQL
- MariaDB
- PostgreSQL
- SQL Server
- SQLite
- Oracle
How long a conversion takes
IntoSQL and the tools people usually reach for, loading the same files on one laptop: 1,000,000 rows and 14 columns with accents, decimal commas and day-first dates in them.
Excel, 117 MB to PostgreSQL
3.9×faster than DuckDB
DuckDB reads the workbook with its excel extension and writes it through its postgres extension.
| Tool | Loads | Time |
|---|---|---|
| IntoSQL | 2.9 s | |
| DuckDB | 11.2 s |
CSV, 174 MB to PostgreSQL
As fast as psql \copy
psql \copy loads every column as text into a table made by hand. IntoSQL makes the table with each column's type and checks every value on the way.
| Tool | Loads | Time |
|---|---|---|
| IntoSQL | 2.4 s | |
| psql \copy | 2.6 s | |
| DuckDB | 5.2 s |
CSV, 174 MB to SQLite
1.5×faster than sqlite3 .import
sqlite3 .import stores every value as text. IntoSQL gives each column its type.
| Tool | Loads | Time |
|---|---|---|
| IntoSQL | 2.1 s | |
| sqlite3 .import | 3.2 s |
Writing the script without loading it takes 0.7 s for the CSV and 1.0 s for the workbook.
Median of 3 runs on an Apple M4 MacBook Air, 10 cores, 24 GB, October 16, 2026, with IntoSQL 0.1.0, PostgreSQL 18.0, DuckDB 1.5.6, SQLite 3.51, each on an empty database on the same machine. In the browser the same engine runs as WebAssembly: a little slower, and spreadsheets are limited by the memory the browser allows.
Database dumps, measured against pgloader
- A 5.3 GB dump of 30 million rows: pgloader needs it restored into a running MySQL first, which takes 18 minutes, then runs out of memory with its defaults. IntoSQL converts the dump in 10 seconds, and psql loads the script in about 3 minutes.
- Across 476 dumps from MySQL 5.5 to 9 and MariaDB 10.3 to 12, loaded into PostgreSQL 13 and 18: no load errors, and no value changed without a line in the report.
The same dumps, converted and loaded by IntoSQL and by pgloader 3.6.7 on one machine (a 10-core i9-10900K with a SATA SSD), in October 2026.
The MySQL to PostgreSQL pageYour file stays on your computer
The converter on this page is IntoSQL's engine compiled to WebAssembly. It runs inside this browser tab: the file is read, checked and converted there, and its content is never sent anywhere.
It works offline
Once this page has loaded, turn off your connection and convert a file. It still works.
Nothing is sent
Open your browser's network panel while a file converts: no request carries any of its content.
No file names in analytics
We count conversions by format and database. The names, columns and values in your files are never recorded.
When a server does the work
The API and AI assistants convert on IntoSQL's servers. Those files are deleted 24 hours after the conversion ends.
This browser tab
The same engine in five places
The converter on this page, the desktop app, the command line, the API and the MCP server run the same engine. A file converts the same way in each, with the same report.
In your browser
Free, with no account. Large CSV and NDJSON files stream in, so their size is not limited by memory.
Convert a file- .xlsx
- .xls
- .xlsb
- .ods
- .csv
- .tsv
- .json
- .ndjson
- PostgreSQL
- MySQL
- MariaDB
- SQLite
- SQL Server
- Oracle
- CSV
- JSON
- .sqlite
Desktop app
For macOS, Windows and Linux, with files of any size. Converting and loading SQLite are free; loading into PostgreSQL, MySQL or MariaDB is part of Pro.
About the desktop app- macOSApple silicon, Intel
- Windowsx64
- LinuxAppImage, .deb
Command line
One program for macOS, Linux and Windows, for scripts and scheduled jobs. Converting and loading into SQLite are free; loading into PostgreSQL, MySQL or MariaDB is part of Pro.
Command line guide$ brew install alfonsobries/intosql/intosql$ intosql convert clientes_2024.xlsx --to postgresql --output clientes.sqlclientes_2024 4 rows 10 fixes 0 rejectedAPI
Send a file or its URL and download the SQL, over HTTP or with the SDKs for seven languages. A webhook calls you when it's done. Part of Pro.
API referenceAI assistants
Ask Claude, ChatGPT or Cursor to convert a file. The hosted MCP server is part of Pro; intosql mcp on your computer is free.
Connect an assistantFree and Pro
Free
$0
The converter on this page, with no account and no limit on how many files.
- Excel, CSV, JSON and MySQL, MariaDB, PostgreSQL, SQL Server, SQLite and Oracle dumps to six databases
- Every fix listed in the report
- A ready SQLite database to download
- The command line, to convert files and load SQLite
IntoSQL Pro
$12 a monthor $96 a year
For files you load often, or from code.
- Loading and saved jobs in the desktop app
- Loading straight into PostgreSQL, MySQL and MariaDB
- The API, with webhooks
- AI assistants through the MCP server
Questions about converting files and databases to SQL
Not answered here? Write to us from the contact page and a person replies. Contact page
Is my file uploaded?
No. The converter runs in your browser with WebAssembly, so the file never leaves your computer.
Is it free?
Converting is free in the browser, the command line and the desktop app. Pro adds loading into database servers, saved jobs, the API and the hosted MCP server.
Do I need an account?
Only for IntoSQL Pro. Converting in the browser needs no account.
How big can the file be?
CSV and NDJSON are read as they stream in, so files of several gigabytes work in the browser. Spreadsheets and JSON documents are read whole, so their limit is the memory the browser gives the page. The desktop app takes files of any size, and the API takes files up to 50 GB.
Which databases does it write SQL for?
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server and Oracle. It can also write the cleaned table as CSV or JSON.
Which databases can it convert from?
Dumps from MySQL 5.5 to 9, MariaDB 10.3 to 12, PostgreSQL 10 and later, SQL Server 2017 and later and Oracle 11g and later, and SQLite database files. Each one converts into a script for any of the six databases.
Does the database have to be running?
No. The converter reads the dump file, so the source database doesn't run anywhere. The script it writes loads with the target's own client, such as psql or mysql.
What does a database conversion leave out?
Views, triggers, procedures, functions and events, which each database writes in its own language. The report lists them by name; the tables, keys, indexes and rows are all in the script.
What about a workbook with several sheets?
The first visible sheet is converted. When a workbook has more, pick another under Sheet.
How does it know whether a date is day-first or month-first?
It looks for a date that can only be read one way, such as 25/03/2026, and reads the whole column that way; the report shows which date decided it. When no date decides it, choose the order in the options.