Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Table Converter

Paste a table in any common format, tidy it in a grid, export it in 29 formats.

Data No upload Works offline Free, no sign-up

Check and fix the table

Find and replace

With a regular expression, $1 inserts the first group.

Edits change the converted output. Clean-up and Find apply to the selected cells, or to the whole table when a single cell is selected. Ctrl+Z undoes.

Convert to

{{Column name}} or {{1}} insert a cell, {{#}} the row number.

Next steps

About the Table Converter

Paste a table — or open a file — in any of the usual formats and get it back in another: CSV or TSV, Excel cells, JSON, JSON Lines, Markdown, HTML, LaTeX, MediaWiki, SQL INSERT statements, XML, YAML, or the text tables that the MySQL and PostgreSQL command lines print. The format is detected for you, and the table appears in an editable grid where you can fix it before converting: edit cells, add or delete rows and columns, transpose, remove duplicates and empty rows, trim spaces, change case, or find and replace with regular expressions.

The output covers 29 formats: data formats (CSV, TSV, four shapes of JSON, JSON Lines, XML, YAML, TOML, SQL for MySQL, PostgreSQL, SQLite or SQL Server), documents and wikis (Markdown, HTML, LaTeX, ASCII and Unicode text tables, MediaWiki, AsciiDoc, Jira/Confluence, reStructuredText, BBCode, Textile), code (JavaScript, Python, pandas, R, PHP, Ruby, MATLAB, DAX) plus Excel (.xlsx), Word (.docx) and a template of your own. Each writer escapes what its format needs, and numbers stay numbers only where that loses nothing.

How to use it

  1. Paste your table into Your table, or choose Open file (CSV, TSV, JSON, XML, HTML, Markdown, LaTeX, SQL, YAML, Excel, OpenDocument or Numbers).
  2. Check what was detected under the box. If needed, set Read as, the delimiter, which table to use (when there are several) and whether the first row is the header.
  3. Fix the data in the grid: click a cell and type, paste blocks from a spreadsheet, or use Clean up (transpose, remove duplicates, empty rows, extra spaces, case) and Find and replace. Ctrl+Z undoes.
  4. Choose the output under Convert to and adjust its options (JSON shape, SQL database and table name, LaTeX booktabs, Markdown style …).
  5. Copy the result or download it as a file.

Examples

MySQL client output to JSON
Input
+----+-------+
| id | name  |
+----+-------+
|  1 | Asha  |
|  2 | Ravi  |
+----+-------+
Result
[
  {
    "id": 1,
    "name": "Asha"
  },
  {
    "id": 2,
    "name": "Ravi"
  }
]

The id column holds only numbers, so they become JSON numbers. Switch off Numbers and true/false as typed values to keep every value a string.

CSV to SQL with codes kept as text
Input
code,city,active
007,Pune,true
120,Delhi,false
Result
CREATE TABLE `my_table` (
  `code` VARCHAR(10),
  `city` VARCHAR(10),
  `active` BOOLEAN
);

INSERT INTO `my_table` (`code`, `city`, `active`) VALUES
  ('007', 'Pune', TRUE),
  ('120', 'Delhi', FALSE);

007 has a leading zero, so the whole code column stays text — a number column would turn it into 7.

An HTML table to Markdown
Input
<table><tr><th>Plan</th><th>Price</th></tr><tr><td>Basic</td><td>₹199</td></tr></table>
Result
| Plan  | Price |
| ----- | ----- |
| Basic | ₹199  |

Common uses

  • Turning query results copied from a terminal, or SQL dumps, into CSV, Excel or JSON.
  • Putting spreadsheet data into documentation as Markdown, HTML, LaTeX, AsciiDoc, reStructuredText or a wiki table.
  • Creating seed data or fixtures for code: SQL inserts, a pandas DataFrame, an R data.frame, a JavaScript array.
  • Moving a table from a web page (HTML) or a LaTeX paper into a spreadsheet.
  • Cleaning up a messy table before you share it: duplicates, stray spaces, inconsistent case.

How tables are read

  • CSV/TSV follow RFC 4180: quoted fields may hold the delimiter, doubled quotes and line breaks. The delimiter (comma, semicolon, tab or pipe, or an Excel sep= line) is detected.
  • JSON (RFC 8259): an array of objects (the union of their keys becomes the columns), an array of arrays, an object of equal-length arrays, an object of objects, or the largest list of objects inside an API response. Nested objects become address.city columns; numbers keep their exact digits.
  • Markdown per the GFM tables extension, including \| escapes and the column alignment. HTML tables follow the HTML table model: colspan and rowspan are placed and their value repeated (or left empty), <br> becomes a line break, scripts are skipped.
  • LaTeX tabular, tabular*, tabularx, longtable and array: \multicolumn, booktabs and \hline rules, formatting commands and escaped characters are handled; math stays as written.
  • MediaWiki (Help:Tables) with !! and || cells, attributes, spans, links and bold/italic markup.
  • SQL INSERT … VALUES (several rows and statements, column lists or the columns of a CREATE TABLE). Backslash escapes are read the MySQL way when the dump looks like MySQL (backticks, ENGINE=), otherwise as standard SQL.
  • XML: the most repeated element is a row, its attributes and child elements the columns. YAML (1.2.2): a list of mappings, like JSON.

Numbers, true/false and empty cells

With Numbers and true/false as typed values on, a column becomes numeric only when every non-empty value is a plain number with at most 15 significant digits — the precision of a double — so 007, +91…, 1,234 and 16-digit IDs keep the column as text. A column of only true/false (any case) becomes booleans. Empty cells become null (JSON, YAML), NULL (SQL), None, NA or nil, or you can keep them as empty text or leave the key out. TOML has no null value, so empty cells are left out there, as TOML v1.0.0 requires.

What each format escapes

  • CSV: quotes around fields with the delimiter, quotes or line breaks; quotes doubled. Optional protection against formulas for spreadsheets: an apostrophe before text starting with =, +, -, @, a tab or a line break (OWASP).
  • Markdown: | as \|, line breaks as <br>. HTML/XML: &, <, > and quotes as entities; XML element names are made valid (First name → First_name).
  • LaTeX: & % $ # _ { } ~ ^ \ escaped. MediaWiki: | as {{!}}, markup wrapped in <nowiki>. Jira/Confluence: |, [, { and ! escaped with a backslash, so cell text never becomes a link, macro or image.
  • SQL: identifiers quoted for the chosen database (backticks, double quotes or brackets), ' doubled (and \ for MySQL), N'…' for non-ASCII text on SQL Server, at most 1,000 rows per INSERT because SQL Server allows no more.
  • YAML strings are quoted whenever they could be read as something else (yes, null, 1.0, 2026-09-28, a: b). Ruby strings escape #{.
  • DAX DATATABLE takes constant values only, so a number column with empty cells is written as STRING.

Limitations

  • Up to 2 million cells; for larger files use the CSV Editor or split them first with the CSV & Excel Splitter.
  • Only the first 1.5 million characters of the output are shown on the page; Copy and Download always have all of it.
  • Formats that cannot merge cells (CSV, JSON, Markdown …) receive merged HTML or wiki cells as repeated values or empty cells.
  • Excel and Word files are built from the grid’s text: number columns become Excel numbers, but dates from text formats stay text. For typed dates, use CSV to Excel.
  • XML with deeply nested or mixed content is flattened to dot-path columns and may need tidying; the most repeated element is assumed to be the row.
  • BBCode has no way to escape [ and ], so cell text that looks like a tag (such as [b]) is read as one by the forum. Jira, Textile and reStructuredText formatting characters other than those listed above (for example *bold*) are written as they are.

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

Which formats can I convert between?

In: CSV, TSV, Excel/Google Sheets cells, XLSX/XLS/ODS/Numbers files, JSON, JSON Lines, Markdown, HTML, LaTeX, MediaWiki, SQL INSERTs, XML, YAML and MySQL/psql/box-drawing text tables. Out: 29 formats, listed under Convert to.

How do I convert an Excel table to Markdown or JSON?

Copy the cells in Excel or Google Sheets and paste them into the box (they arrive as tab-separated text), or open the .xlsx file. Then choose Markdown or JSON under Convert to.

Why did my numbers turn into strings in the JSON?

A column becomes numeric only if every value in it is a plain number. One value such as N/A, 007, 1,250 or a 16-digit ID keeps the whole column as text, so nothing is changed or rounded. Fix the odd values in the grid, or switch typing off for all text.

Can I convert an HTML table from a website?

Yes — paste the table’s HTML, or select the table on the web page, copy it and paste it into the box. When the HTML has several tables, choose which one under Table.

Does the SQL work in MySQL, PostgreSQL, SQLite and SQL Server?

Choose the database under Database: identifiers, strings, booleans and column types follow that database’s syntax. Column types are inferred (INT/BIGINT, DOUBLE, BOOLEAN or text) — review them before using the table for production data.

Is my data uploaded anywhere?

No. Reading, editing and converting all happen in your browser; files you open are not sent anywhere.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.