piapia123
en

Table Converter (CSV / TSV / Markdown / HTML / JSON)

Text

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Turn one flavour of delimited data into another: CSV exported from Excel or a database, tab-separated output from a terminal, a Markdown table from a document. Paste it in and get a Markdown table, an ASCII box table, an HTML table, a JSON array or plain CSV. The delimiter is detected automatically (tab first) and can be set by hand. Quotes follow RFC 4180, so a field like "Smith, John" stays one column. Column widths are measured in display width, so CJK columns line up instead of drifting by one character per ideograph. If the table has no header row, tick "first row is data" so the first row is not swallowed as column names.

Features

  • Five outputs: Markdown table, ASCII box table, HTML table, JSON array, CSV
  • ASCII output comes in two styles: aligned (bordered) or compact (borderless, aligned by column spacing)
  • Automatic delimiter detection — tab, comma, pipe, whitespace — or set it manually
  • RFC 4180 quote handling, so commas inside quoted fields do not split columns
  • Headerless tables supported, so the first data row is not eaten as column names
  • Markdown tables paste back in directly; the separator row is skipped
  • Columns aligned by display width, so CJK text does not drift out of line
  • Rows with fewer cells are padded to the widest row
  • HTML output escapes & < > ", so it is safe to paste into a page
  • JSON output keeps leading zeros — 007 stays a string, not the number 7

How to use

  1. Paste CSV, TSV or a Markdown table; the first row is the header by default
  2. Pick an output format — the result updates as you type
  3. No header row? Tick "first row is data, not a header"
  4. If the detected delimiter is wrong, choose one explicitly
  5. Copy the result. JSON and HTML output are syntax-highlighted

FAQ

Why are numbers quoted in the JSON output?
Because every cell in a table is text, and for some of them the text form matters: an employee number 007 becomes 7 the moment it is treated as a number, and postcodes and national ID numbers have the same problem. Values are therefore always strings; convert them in code where a number is actually wanted.
What does Excel or Google Sheets put on the clipboard?
Tabs. That is why tab is checked first when detecting the delimiter: in content copied from a spreadsheet, commas are almost certain to appear inside the data (addresses, thousands separators), while tabs will not.
What if two header cells have the same name?
Markdown, ASCII and HTML can all represent a repeated column and are produced normally. JSON cannot — an object cannot hold two keys with one name, and silently dropping a column would leave data that looks complete and is not. So that case is reported, and you are asked to rename one of them.
My table has no header — the first row is data. What then?
Tick "first row is data, not a header". Left unticked, the first row is taken as column names and disappears from the data: you lose a row, and the "column names" look plausible enough that it is easy to miss. Each format handles it differently: CSV simply omits the header line, JSON becomes an array of arrays (no names means no keys, and inventing "column1" would be putting content into your data), the ASCII box table and HTML drop their header row, and Markdown keeps an empty header row because its grammar requires one.
Is my data uploaded?
No. The conversion happens in the browser and the page sends no requests — table data is often a customer list or an internal report, and none of it leaves the machine.
What is the compact style for?
For pasting the table somewhere with no monospace-table rendering: a code comment, a plain-text file, a note in a terminal. The `+---+` borders get in the way there, while two spaces between columns is enough to line things up. Both styles share the same width algorithm (display width), so CJK text lines up in either one.

Related tools