Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
The Markdown To SQL Converter on A.Tools transforms Markdown pipe-delimited tables into SQL CREATE TABLE and INSERT INTO statements for MySQL, PostgreSQL, SQLite, and SQL Server. All processing runs in your browser. No data leaves your device.
Developers document data structures in Markdown tables within README files and wikis. Databases require SQL statements to create and populate tables. This tool bridges the two without manual SQL writing.
Click Enter Data to paste a Markdown table into the input area, or click Choose File to drag and drop a .md file. Press Sample to load example data.
Once parsed, an interactive spreadsheet appears. Use the toolbar to:
Add or delete rows and columns
Transpose the table (swap rows and columns)
Remove duplicate rows
Delete empty rows and columns
Change text case (UPPERCASE, lowercase, Capitalize)
Find and replace values — supports case-sensitive search and regex
Toggle First Row as Header to define column names
Right-click any cell for context-menu operations.
In the Properties panel:
| Setting | Options | Description |
|---|---|---|
| Create Table | On / Off | Generates a CREATE TABLE statement |
| Batch Insert | On / Off | Combines all rows into a single INSERT statement |
| Drop Table (If Exists) | On / Off | Adds DROP TABLE IF EXISTS before CREATE TABLE |
| Database Type | MySQL / PostgreSQL / SQLite / SQL Server | Sets the SQL dialect |
| Table Name | Custom name | The name used in CREATE TABLE and INSERT INTO |
| Primary Key | Column name (optional) | Marks a column as PRIMARY KEY |
Click Convert to generate SQL output. Use Copy to Clipboard or Download File to save.
Two input modes: Paste Markdown directly or upload a .md file
Full table editor: Edit, transpose, deduplicate, find-and-replace before converting
4 database dialects: MySQL, PostgreSQL, SQLite, SQL Server
CREATE TABLE generation: Column names from header row, type inference
INSERT generation: Individual or batch mode
Primary key support: Designate any column as the primary key
DROP TABLE option: Idempotent script generation
Client-side processing: Files never leave the browser
Undo/Redo: Full edit history with revert support
Context menu: Right-click for quick row/column/cell operations
Given this Markdown input:
| id | name | age |
|----|-------|-----|
| 1 | Alice | 30 |
| 2 | Bob | 25 |
With Create Table and Batch Insert enabled, the tool generates:
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` TEXT,
`name` TEXT,
`age` TEXT,
PRIMARY KEY (`id`)
);
INSERT INTO `users` (`id`, `name`, `age`) VALUES
('1', 'Alice', '30'),
('2', 'Bob', '25');
With Batch Insert disabled, each row gets its own INSERT:
INSERT INTO `users` (`id`, `name`, `age`) VALUES ('1', 'Alice', '30');
INSERT INTO `users` (`id`, `name`, `age`) VALUES ('2', 'Bob', '25');
Generated when the toggle is on. Column names come from the first row (header). Column types default to TEXT unless type inference detects integers or floats.
Generated for every data row. String values are wrapped in single quotes. NULL values are preserved.
Generated when the toggle is on. Placed before CREATE TABLE to enable idempotent script execution.
The tool generates dialect-specific SQL syntax:
| Feature | MySQL | PostgreSQL | SQLite | SQL Server |
|---|---|---|---|---|
| Identifier quoting | `name` | "name" | "name" | [name] |
| String quoting | 'value' | 'value' | 'value' | 'value' |
| DROP IF EXISTS | DROP TABLE IF EXISTS | DROP TABLE IF EXISTS | DROP TABLE IF EXISTS | IF OBJECT_ID(...) IS NOT NULL DROP TABLE |
| AUTO_INCREMENT | AUTO_INCREMENT | SERIAL | AUTOINCREMENT | IDENTITY(1,1) |
| Batch INSERT | VALUES (), (), () | VALUES (), (), () | VALUES (), (), () | INSERT ... SELECT UNION ALL |
| Primary Key | Inline or constraint | Inline or constraint | Inline or constraint | Inline or constraint |
Documentation links:
When enabled, generates a CREATE TABLE statement with columns derived from the header row. Column types default to TEXT. The tool performs basic type inference: if every value in a column is numeric, the type is set to INTEGER or FLOAT.
Disable this option when you only need INSERT statements for an existing table.
When enabled, all data rows are combined into a single INSERT INTO ... VALUES (), (), () statement. This is faster to execute than individual inserts.
When disabled, each row generates its own INSERT INTO statement. Easier to debug and modify individual rows.
Adds DROP TABLE IF EXISTS before CREATE TABLE. Use this when generating idempotent scripts that can be re-run without errors.
Do not enable if the target database already contains data you want to preserve.
Controls the SQL dialect for:
Identifier quoting (backticks, double quotes, square brackets)
DROP TABLE syntax
Auto-increment column types
Batch insert syntax
Sets the table name used in CREATE TABLE and INSERT INTO statements. Use lowercase with underscores for convention (e.g., user_accounts).
Enter a column name to mark it as PRIMARY KEY. The column must exist in the header row. This adds a PRIMARY KEY (column_name) constraint to the CREATE TABLE statement.
| Scenario | Use Markdown | Use SQL | Convert |
|---|---|---|---|
| README documentation | Yes | No | — |
| Database schema migration | No | Yes | Markdown → SQL |
| Seeding a database | No | Yes | Markdown → SQL |
| Quick prototyping | Both | Both | As needed |
| Data in version control (Git) | Yes | Yes | Markdown → SQL |
| Test fixture generation | No | Yes | Markdown → SQL |
| API documentation | Yes | No | — |
Markdown tables are for human-readable documentation. SQL is for machine-executable database operations. This converter eliminates manual translation when tabular data needs to become database records.
No. All file parsing and conversion runs in your browser using JavaScript. Your data stays on your device. A.Tools never receives, stores, or transmits your file contents.
The tool supports standard pipe-delimited Markdown tables following the CommonMark specification, including tables with or without leading/trailing pipes and alignment indicators.
MySQL, PostgreSQL, SQLite, and Microsoft SQL Server. The Database Type dropdown in the Properties panel switches between dialect-specific syntax for identifier quoting, DROP TABLE, and batch INSERT.
Batch insert combines all rows into a single INSERT INTO ... VALUES (), (), () statement, which executes faster. Individual inserts generate one INSERT INTO per row, which is easier to debug and edit.
Yes. By default, all columns are typed as TEXT. If every value in a column is a valid integer, the type is set to INTEGER. If every value is a valid number with a decimal point, the type is set to FLOAT.
Yes. Enter the column name in the Primary Key field. The column must match one of your header row values. The tool adds a PRIMARY KEY (column_name) constraint to the CREATE TABLE statement.
It adds DROP TABLE IF EXISTS table_name before the CREATE TABLE statement. This makes the generated script idempotent — safe to re-run without errors. Do not enable if the table already contains data you want to keep.
Processing is client-side, so the limit depends on your browser's memory. Tables with tens of thousands of rows work reliably on modern browsers.