IT Market
Tools/Code/Documents/HTML Table to CSV and JSON Converter Online
TABLE → CSV/JSON

Конвертируйте HTML таблицу в CSV или JSON

Tool guide

HTML Table to CSV and JSON Converter Online

Paste the raw markup of a table and get the same rows back twice over: as CSV that Excel and Google Sheets open directly, and as a JSON array of objects keyed by the header row. It is the workaround for pages that show you a table but never offer an export button, such as an internal dashboard or a documentation page. Parsing runs in your own browser tab, so the markup never leaves the machine. See also: build an HTML table from a JSON array, open the exported CSV as a spreadsheet, line up the columns and preview the CSV.

How to use it

  1. Paste the table markup, including the table, tr and td tags, into the «HTML Table Input» box.
  2. Press «To CSV» when the rows are headed for Excel, Google Sheets or a CRM import.
  3. Press «To JSON» to get an array of objects whose keys come from the first row of the table.
  4. Read the parse in the «Result:» box and check that every row ended up with the same column count.
  5. Press «Download» to save the result as a file, or select the «Output» text and copy it by hand.

FAQ

How do I export a table from a page that has no export button?

Open developer tools, find the table element, choose Copy outer HTML and paste it into «HTML Table Input». «To CSV» gives you comma-separated rows and «Download» saves them as a file that Excel opens directly. Google Sheets takes the same file through File, then Import.

Where do the JSON keys come from?

They are taken from the first row of the table, so that row needs to be the header. If your markup starts straight with data, the keys end up being the values of the first record. Add a header row of th cells before converting, or rename the keys afterwards in your editor.

What happens to colspan and rowspan cells?

Merged cells are not expanded. Each cell appears once, so a row with a colspan comes out shorter than its neighbours and the columns shift. Flatten a multi-level header down to a single header row before pasting, and make sure every row carries the same number of cells.

My cells contain commas — will the CSV break?

Nothing needs doing: a cell holding a comma, a semicolon, a quote or a line break is wrapped in double quotes by the converter, and an inner quote is doubled, exactly as CSV requires. Excel and Google Sheets read such a field as one column. Do not add the quotes yourself — that only breaks the result, because yours get escaped as part of the text.

Excel shows my Cyrillic text as garbage characters.

The file is written as UTF-8, and Excel often assumes a legacy code page when a CSV is opened by double-clicking. Import it through Data, then From Text/CSV, and pick Unicode UTF-8 as the file origin. Opening the same file in Google Sheets also detects the encoding correctly.

Does the pasted markup get uploaded anywhere?

No. The page parses your HTML with the browser's own parser and writes the result into the box next to it; no request carrying your data is made. That makes it safe to paste a table copied out of an internal admin panel, and closing the tab clears everything.

Examples

Price list scraped off a supplier page
Before: ItemPriceCable390Router4290
After: Item,Price Cable,390 Router,4290
Same rows, this time for the front end
Before: Press «To JSON» on the markup above
After: [{"Item":"Cable","Price":"390"},{"Item":"Router","Price":"4290"}]