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

# Convert Excel to MariaDB

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

## From Excel to MariaDB, column by column

The sample above, clientes_2024.xlsx, as IntoSQL writes it for MariaDB: 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 | MariaDB type | In the script |
| --- | --- | --- | --- | --- |
| Nº Cliente | `00127` | `no_cliente` | `varchar(8)` | `'00127'` |
| Nombre | `Peña Muñoz` | `nombre` | `varchar(16)` | `'Peña Muñoz'` |
| C.P. | `01234` | `c_p` | `varchar(8)` | `'01234'` |
| Alta | `03/02/2024` | `alta` | `date` | `'2024-02-03'` |
| Activo | `sí` | `activo` | `tinyint(1)` | `TRUE` |
| Saldo | `1.234,50` | `saldo` | `decimal(6,2)` | `1234.50` |

## Load the script into MariaDB

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

### MariaDB

```shell
mariadb --default-character-set=utf8mb4 mydb < clientes_2024.mariadb.sql
```

The script sets utf8mb4 itself; the flag makes the client send it the same way, so accents arrive intact. In HeidiSQL or DBeaver, open the script and run it.

Without a script:

```shell
intosql load clientes_2024.xlsx --into mariadb://user@localhost/mydb
```

## What IntoSQL reads in Excel files

- The header row is found even when titles or notes sit above it, and a totals row at the end is left out.
- Dates stored as Excel serial numbers become real dates, in both the 1900 and the 1904 date systems.
- Codes with leading zeros, like 00127, stay text. When a workbook has several sheets, you pick the sheet.

## What to know about MariaDB

- Yes and no values become tinyint(1). Text up to 255 characters is varchar; longer text is text, mediumtext or longtext by size.
- The script uses utf8mb4 and sets the SQL mode, so accents, emoji, backslashes and line breaks load as written.
- MariaDB's datetime stores no time zone.

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

| Value | MariaDB |
| --- | --- |
| Yes and no | `tinyint(1)` |
| Whole numbers | `int` |
| Large whole numbers | `bigint` |
| Decimals | `decimal(p,s) · double` |
| Floating-point numbers | `double` |
| Dates | `date` |
| Times of day | `time(6) · time` |
| Dates with a time | `datetime(6) · datetime` |
| Dates with a time and offset | `datetime(6) · datetime` |
| Text | `varchar(n) · text · mediumtext · longtext` |

## Questions about Excel to MariaDB

### How do I convert Excel to MariaDB?

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

### Which sheet of the workbook is converted?

The first visible sheet. When a workbook has more than one, a Sheet option appears, so you can pick another.

### Which MariaDB types does it use?

Yes and no values become tinyint(1), whole numbers int, decimals decimal(p,s), dates date, dates with a time datetime(6) and text varchar(n). Sizes come from the longest value in each column.

### Does it keep leading zeros in MariaDB?

Yes. A code such as 00127 stays text, so MariaDB stores it as varchar(8) and the script writes it as '00127'.

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

Yes, with IntoSQL Pro. The desktop app and the command line connect to MariaDB and load the rows straight in, creating the table first.

### How big can the Excel file be?

In the browser, a workbook is read whole, so the limit is the memory the browser gives this page. The desktop app and the command line take workbooks of any size; on an Apple M4 laptop the command line converts a 117 MB workbook of a million rows in about a second.

## Excel into other databases

- [Convert Excel to SQL](https://intosql.com/excel-to-sql)
- [Convert Excel to PostgreSQL](https://intosql.com/excel-to-postgresql)
- [Convert Excel to MySQL](https://intosql.com/excel-to-mysql)
- [Convert Excel to SQLite](https://intosql.com/excel-to-sqlite)
- [Convert Excel to SQL Server](https://intosql.com/excel-to-sql-server)
- [Convert Excel to Oracle](https://intosql.com/excel-to-oracle)

## Other files into MariaDB

- [Convert CSV to MariaDB](https://intosql.com/csv-to-mariadb)
- [Convert JSON to MariaDB](https://intosql.com/json-to-mariadb)
