One CSV converter, seven output formats
When you are not yet sure which format a system wants, or you need the same data in several places, switching between single-purpose pages gets tedious. This CSV converter keeps one input and gives you a button per target format, so you can see the JSON, XML, YAML, TSV, HTML, SQL and Markdown versions of your data side by side in a few clicks.
All seven outputs share the same parsing step. The CSV is read once with your delimiter, header and typing settings, and then written out in the format of the button you press.
Example: one input, several results
isbn,title,year
9780262033848,Introduction to Algorithms,2009
0131103628,The C Programming Language,1988
To Markdown produces a padded, left-aligned table:
| isbn | title | year |
| :------------ | :------------------------- | :--- |
| 9780262033848 | Introduction to Algorithms | 2009 |
| 0131103628 | The C Programming Language | 1988 |
To SQL produces a table definition and inserts:
CREATE TABLE `my_table` (
`isbn` VARCHAR(255),
`title` VARCHAR(255),
`year` INT
);
INSERT INTO `my_table` (`isbn`, `title`, `year`) VALUES (9780262033848, 'Introduction to Algorithms', 2009);
INSERT INTO `my_table` (`isbn`, `title`, `year`) VALUES ('0131103628', 'The C Programming Language', 1988);
The ISBN column is a good warning sign. The first ISBN has no leading zero and was read as a number, the second starts with 0 and stayed text. For identifier columns like this, untick Detect numbers & booleans so every output treats them consistently as strings.
Choosing a target format
- JSON for web APIs, JavaScript code and document databases.
- XML for older integrations, SOAP services and systems that import XML feeds.
- YAML for configuration files, test fixtures and seed data that people edit by hand.
- TSV for pasting into a spreadsheet, where tabs split cells reliably.
- HTML for showing the data on a web page or in a CMS.
- SQL for loading the rows into a relational database.
- Markdown for README files, wikis, pull request descriptions and issue comments.
What each button produces
| Button | Output | Defaults used |
|---|---|---|
| To JSON | Array of objects, one per row | Keys from the header, your Indent |
| To XML | <root> with one <item> per row | XML declaration, your Indent |
| To YAML | A YAML list of mappings | Ambiguous strings such as '0131103628' are quoted |
| To TSV | Tab-separated text with a header line | Values with tabs or quotes are quoted |
| To HTML | A <table> with <thead> and <tbody> | No CSS; Preview tab shows the rendered table |
| To SQL | CREATE TABLE plus one INSERT per row | Table my_table, MySQL backticks |
| To Markdown | GitHub-style pipe table | Left aligned, padded columns |
The Indent setting (2, 3 or 4 spaces or a tab) matters for JSON, XML and YAML; YAML does not use tabs, so the tab choice falls back to two spaces there. The other formats ignore it.
Shared parsing options
- Delimiter – Auto-detect or a fixed comma, semicolon, pipe or tab. Setting it explicitly is safer for files with only one column.
- First row is header – supplies keys, element names and column names. Without it, the outputs work with positional columns: SQL names them
column1,column2and Markdown usesColumn 1,Column 2. - Detect numbers & booleans – decides whether
2009is written as a number or a string. It changes JSON and YAML types, whether SQL values are quoted and which column types CREATE TABLE infers.
When a dedicated page is the better choice
This page trades options for speed. Each target has its own converter with the settings that only make sense for that format:
- CSV to SQL lets you set the table name, choose PostgreSQL, SQL Server or no identifier quoting, skip CREATE TABLE and write a single multi-row INSERT.
- CSV to XML lets you rename the root and row elements and turn columns into attributes.
- Markdown table generator adds alignment choices and compact output without padding.
Two formats are not on the button row: spreadsheets and plain lists. For a real .xlsx file use CSV to Excel, which builds a workbook with sized columns.
Tips for clean conversions
- Make header names simple. Spaces and symbols are fine for JSON and SQL, but XML element names cannot contain spaces, so
full namebecomesfull_namethere. - Check a few rows in each output before you rely on it. Quoted cells with commas or line breaks are handled, but a missing closing quote stops the conversion with an error naming the record.
- Empty cells become empty strings in every format, never null.
Privacy
Every conversion runs in your browser. Your CSV reaches our server only if you use Load URL or save a shareable link with Save & Share.