FormatterHQ

CSV Converter

Paste a CSV once and turn it into JSON, XML, YAML, TSV, an HTML table, SQL inserts or a Markdown table. Each button converts the same input with shared parsing options.

Input CSV
Output JSON
Ready.

How to use the CSV Converter

  1. Paste CSV into the editor, upload or drop a file, use Load URL, or click Sample.
  2. Check the parsing options: Delimiter, First row is header, Detect numbers & booleans and Indent.
  3. Click a target button: To JSON, To XML, To YAML, To TSV, To HTML, To SQL or To Markdown.
  4. Compare outputs by clicking another button, then Copy or Download the one you need.

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

ButtonOutputDefaults used
To JSONArray of objects, one per rowKeys from the header, your Indent
To XML<root> with one <item> per rowXML declaration, your Indent
To YAMLA YAML list of mappingsAmbiguous strings such as '0131103628' are quoted
To TSVTab-separated text with a header lineValues with tabs or quotes are quoted
To HTMLA <table> with <thead> and <tbody>No CSS; Preview tab shows the rendered table
To SQLCREATE TABLE plus one INSERT per rowTable my_table, MySQL backticks
To MarkdownGitHub-style pipe tableLeft 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, column2 and Markdown uses Column 1, Column 2.
  • Detect numbers & booleans – decides whether 2009 is 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 name becomes full_name there.
  • 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.

Frequently asked questions

Can I convert CSV to Excel here?
Not from this page, because the buttons produce text formats. Use the CSV to Excel converter, which creates a downloadable .xlsx workbook with a named sheet and sized columns.
Why are some numbers quoted in the SQL or YAML output?
Values with leading zeros, plus signs or more than 15 digits are kept as text on purpose, so they are quoted. If a whole column should be text, untick Detect numbers & booleans to make every row consistent.
Does the converter keep the column order?
Yes. Columns appear in the order of the header row in every output format, and rows keep their original order.
Can I change the SQL table name here?
The SQL button uses my_table with MySQL backtick quoting. For another table name, quoting style or a single multi-row INSERT, use the dedicated CSV to SQL converter.

Last updated September 26, 2026

Related tools

Word to HTML Converter Convert Word .docx documents to clean, semantic HTML with headings, lists, tables, links and images — right in your browser. XML Converter Convert XML to JSON, YAML, CSV, TSV, HTML or plain text from one page. Attributes and repeated elements handled automatically. YAML Converter Convert YAML to JSON, XML, CSV, TOML or an HTML table in one place. Anchors, aliases and multi-document files supported. Base64 to CSV Decode a Base64 string back to CSV with syntax highlighting. Compare CSV Files Compare two CSV files by key column or row position: see added, removed and changed rows with old and new values, then export the differences. CSV Editor Online Edit CSV files online like a spreadsheet: change cells, add, move or delete rows and columns, sort, filter, find and replace, undo, then export. CSV to Excel Converter Convert CSV to Excel online for free. Download a real .xlsx workbook generated in your browser. CSV to HTML Table Converter Convert CSV to HTML online for free. Get clean table markup with a live preview. CSV to JSON Converter Convert CSV to JSON online for free. Get formatted JSON with types detected automatically. CSV to Multi-line Data Converter Convert CSV to Multi-line Text online for free. Every value on its own line, record by record. CSV to SQL Converter Convert CSV to SQL online for free. CREATE TABLE and INSERT statements with escaped values. CSV to TSV Converter Convert CSV to TSV online for free. Paste the result straight into a spreadsheet.