---
title: "Convert CSV to SQLite"
description: "Convert CSV files to SQL for SQLite in your browser: a CREATE TABLE with typed columns, then INSERT statements. Free, and your file is never uploaded."
canonical: https://intosql.com/csv-to-sqlite
last_updated: 2026-10-15
---

# Convert CSV to SQLite

Drop your CSV file to get a SQLite script with CREATE TABLE and INSERT statements. Each column gets a type, and every fix is listed with its row and column.

## From CSV to SQLite, column by column

The sample above, ventas_2024.csv, as IntoSQL writes it for SQLite: what each column holds in the file, the type it gets and how its first value lands in the script.

| In the file | First value | Column | SQLite type | In the script |
| --- | --- | --- | --- | --- |
| Folio | `00412` | `folio` | `TEXT` | `'00412'` |
| Cliente | `Peña Muñoz` | `cliente` | `TEXT` | `'Peña Muñoz'` |
| Ciudad | `Mérida` | `ciudad` | `TEXT` | `'Mérida'` |
| Fecha | `15/02/2024` | `fecha` | `DATE` | `'2024-02-15'` |
| Importe | `1.234,50` | `importe` | `NUMERIC(6,2)` | `1234.50` |
| Pagado | `sí` | `pagado` | `BOOLEAN` | `1` |

## Load the script into SQLite

The download is a plain .sql file. Run it with SQLite's own tools.

### SQLite

```shell
sqlite3 ventas_2024.db < ventas_2024.sqlite.sql
```

The database file is created if it doesn't exist. The converter also downloads a ready .sqlite database, with no command at all. In DB Browser for SQLite, choose Execute SQL, open the script and run it.

Without a script:

```shell
intosql load ventas_2024.csv --into ventas_2024.db
```

## What IntoSQL reads in CSV files

- The encoding is detected, Windows-1252 and UTF-16 included, so accents and ñ arrive intact.
- The separator is detected: comma, semicolon, tab or vertical bar. With a semicolon, decimal commas like 1.234,50 are read as numbers.
- Quoted values can hold separators and line breaks.

## What to know about SQLite

- Each column gets the type its values need, like INTEGER, NUMERIC, TEXT, DATE or BOOLEAN; yes and no are stored as 1 and 0.
- Decimals with more than 15 digits stay TEXT, so no digit is rounded away.
- Download the SQLite script, or a ready .sqlite database built in your browser.

### How each kind of value is stored in SQLite

| Value | SQLite |
| --- | --- |
| Yes and no | `BOOLEAN` |
| Whole numbers | `INTEGER` |
| Large whole numbers | `INTEGER` |
| Decimals | `NUMERIC(p,s) · TEXT` |
| Floating-point numbers | `REAL` |
| Dates | `DATE` |
| Times of day | `TIME` |
| Dates with a time | `DATETIME` |
| Dates with a time and offset | `DATETIME` |
| Text | `TEXT` |

## Questions about CSV to SQLite

### How do I convert CSV to SQLite?

Drop your file on the converter at the top of this page. It finds the header, reads every value and writes the SQLite script, listing each fix it made. Download the script and run it with sqlite3.

### What if my CSV uses semicolons or tabs?

The separator is detected: comma, semicolon, tab or vertical bar. You can also set it under More options. With a semicolon, decimal commas such as 1.234,50 are read as numbers.

### Which SQLite types does it use?

Yes and no values become BOOLEAN, whole numbers INTEGER, decimals NUMERIC(p,s), dates DATE, dates with a time DATETIME and text TEXT. Sizes come from the longest value in each column.

### Does it keep leading zeros in SQLite?

Yes. A code such as 00412 stays text, so SQLite stores it as TEXT and the script writes it as '00412'.

### Can it load the data into SQLite without a script?

Yes, for free: intosql load creates the SQLite database file and loads the rows in. The converter on this page also downloads a ready .sqlite database.

### How big can the CSV file be?

The browser reads a CSV as it streams in, so files of several gigabytes work. On an Apple M4 laptop the command line converts a 174 MB CSV of a million rows in under a second.

## CSV into other databases

- [Convert CSV to SQL](https://intosql.com/csv-to-sql)
- [Convert CSV to PostgreSQL](https://intosql.com/csv-to-postgresql)
- [Convert CSV to MySQL](https://intosql.com/csv-to-mysql)
- [Convert CSV to MariaDB](https://intosql.com/csv-to-mariadb)
- [Convert CSV to SQL Server](https://intosql.com/csv-to-sql-server)
- [Convert CSV to Oracle](https://intosql.com/csv-to-oracle)

## Other files into SQLite

- [Convert Excel to SQLite](https://intosql.com/excel-to-sqlite)
- [Convert JSON to SQLite](https://intosql.com/json-to-sqlite)
