Skip to content
Menu
Theme

Text Table Converter

Convert a table between Markdown, CSV, TSV, HTML, JSON and a plain text box table. Free, detects the input format and runs entirely in your browser.

DeveloperRuns in your browser
Paste a table in any of the formats below. The result updates as you type.

Detected: CSV

What is a text table converter?

A text table converter takes a table written in one format and writes the same table in another. The rows and columns stay the same. Only the way they are written changes.

Tables travel between very different places. A spreadsheet hands you CSV or tab separated text. A README file wants Markdown. A web page needs HTML. A script expects JSON. A database console prints a box drawn with plus signs, hyphens and pipes. Rewriting a table by hand from one of these to another is slow, and one missing pipe or quote can break the whole thing.

The tool reads and writes six formats:

  • Markdown, the pipe tables used in README files, wikis and many note apps.
  • CSV, values split by commas, as saved by spreadsheets.
  • TSV, values split by tabs, which is what you get when you copy cells straight out of a spreadsheet.
  • HTML, a table with header and body rows for a web page.
  • JSON, a list of objects where each column header becomes a key.
  • MySQL box, the plain text table that database consoles print.

When the input format is set to detect automatically, the tool looks at your text and works out which of these it is, then tells you what it found. The first row is treated as the header. Short rows are filled out to match the widest one, so every row has the same number of columns. Cells that contain commas, quotes or line breaks are quoted and escaped the right way for each format, and the Markdown output lines up its columns so it is easy to read as plain text. Letters with accents and other alphabets are kept exactly as they are.

Everything runs in your browser. Your table is not sent anywhere and is gone when you close the page.

How to use the text table converter

  1. Choose the input format, or leave it on detect automatically.
  2. Choose the output format you want.
  3. Paste your table into the text box, replacing the short sample.
  4. Read the converted table in the Result box. It updates as you type or change a format.
  5. If the input cannot be read, a message under the box says why, for example that the JSON is not valid.
  6. Press the copy button and paste the table wherever you need it.

FAQ

How does detection decide the format?

It looks for telltale signs: a <table> tag for HTML, a square or curly bracket at the start for JSON, rows of pipes for Markdown, plus sign borders for the box format, and tabs or commas for TSV and CSV. If the guess is wrong, pick the input format yourself.

What JSON can it read?

A list of objects, where each object is one row and the keys are the column names, or a list of lists, where the first list is the header. When it writes JSON it uses the first row as keys, and repeated header names get a number added so no column is lost.

Can I paste a table from a web page?

Copying a table from a browser usually gives tab separated text, so it converts as TSV. If you have the HTML source instead, paste that and choose HTML.

What happens to line breaks inside a cell?

CSV keeps them inside quotes. Markdown cannot hold a line break in a cell, so it is written as <br>, which most Markdown viewers show as a new line. Pipes inside a Markdown cell are escaped so they do not split the cell.

Is my table stored or sent anywhere?

No. The conversion happens inside the page on your own device. Nothing is uploaded and nothing is saved after you close the tab.

Related tools