HTML table to CSV converter — paste HTML or full page source, extract all tables, get CSV/TSV/JSON/Excel-ready output with header detection + colspan/rowspan handling.
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
What this tool does
Paste any HTML — a single `<table>` snippet, a saved page, View-Source output, an inspect-element copy, an exported MHTML — and pull every `<table>` out in CSV, TSV, JSON, or Markdown. The grid is rebuilt correctly: `colspan` cells are stamped across the right number of columns, `rowspan` cells pre-occupy the rows below so the next row's data doesn't drift one column left, `<br>` becomes `\n`, `&` becomes `&`. Nested tables are pulled out as their own tables (the parent cell gets a `[table #N]` marker pointing to where the nested one lives in the output list). Header detection is automatic: if the source had `<thead>` we trust it; otherwise we look at the first row and decide based on whether the cells look textual or numeric. You can override with "first row" or "no header". CSV output is RFC 4180 (minimal quoting by default, "always" or "never" available), with an optional UTF-8 BOM so Excel double-click opens correctly. TSV is IANA-standard tab-separated. JSON is either array-of-objects (when a header exists) or array-of-arrays (when it doesn't); multi-row headers merge with " / ". Markdown emits GFM tables with pipe-escaping. Everything happens in your browser via the native DOMParser — no upload, no external script, no third-party dependency.
Tool details
- Input
- Text + Numbers + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 25 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How HTML Table to CSV Converter fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 JSON to TypeScript Interface JSON to TypeScript interface — paste JSON, get clean interfaces with union types from arrays, optional vs required detection, root name customizable. Open
- 2 CSV ⇄ JSON Converter Convert CSV to JSON or JSON to CSV — handles quoted commas, newlines in cells, custom delimiter — browser-only Open
- 3 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
Real-world use cases
Pull a Wikipedia comparison table into a spreadsheet in 5 seconds
You're writing a research note and want the "List of countries by GDP" table from Wikipedia in a sortable spreadsheet. Wikipedia tables famously use `rowspan` for repeated values (the same continent spans 5 rows of countries) and `colspan` for grouped headers. Right-click the table in your browser, "Inspect", copy the outer `<table>` element, paste it here. The grid comes out correctly: each country gets its continent on the right row instead of falling off-by-one. Click "Download" — open the CSV in Excel or Google Sheets and start sorting. No browser extension, no scraping script, no Wikipedia API key.
Extract a GitHub Insights table for a weekly report
GitHub's Insights pages (Pulse, Contributors, Traffic) all render their data as HTML tables with merged-header `<thead>` rows. Open Pulse for your repo, save the page or copy the table element, paste here. Switch output to JSON with header mode "Auto" — you get an array of `{"week / stars": 412, "week / forks": 95, ...}` objects ready to feed into your dashboard generator. The double- header merge (top header has `colspan`, bottom header has the actual column names) is one of the most common reasons ad-hoc scraping scripts produce garbage; this tool gets it right because the grid model handles `colspan` correctly.
Scrape a government open-data page when there's no CSV download link
A lot of `.gov` and `.gov.cn` sites publish tables of budgets, permits, or rosters as HTML with no "download CSV" button. Open the page, copy the `<table>` (or save the whole page and paste the source), and you get a CSV with commas inside address fields properly quoted per RFC 4180. Check "BOM (Excel UTF-8)" before downloading if the data has Chinese characters — Excel needs the BOM to detect UTF-8, otherwise you get mojibake. The whole operation runs locally; you never have to upload a screenshot of the table to an OCR-then-CSV web service.
Convert a forum-thread ranking table to Markdown for a wiki page
A community forum has a "Top 50 contributors this month" table you want to embed in your team's wiki. The wiki uses GitHub-flavoured Markdown. Paste the HTML, switch output format to Markdown — the result is a valid GFM table you can paste directly into the wiki. Pipe characters inside cells (user signatures often contain them) are escaped to `\|`, multi-line cells get collapsed to a space so the Markdown stays parseable as a single-row-per-line table.
Diff two versions of a "specs" table on a vendor site
A vendor updates their published spec sheet and the only way to see what changed is to compare two HTML versions of the same table. Extract both as CSV with identical settings, then `diff` them — every row alignment will match even if the vendor added or removed `rowspan` cells in the new version, because the grid model normalises both to a rectangular layout. This is roughly impossible to do with a raw HTML diff (whitespace and attribute reordering drown out the actual changes).
Bulk-export 20 nested tables from a saved expense report
Some legacy CRMs export expense reports as one giant HTML page with a top-level table where each row contains a nested `<table>` of line items (receipts, taxes, mileage). Paste the whole page in. The tool returns 21 tables: the summary on top, then each nested line-item table as its own entry. The summary cells show `[table #1]`, `[table #2]` etc. so you can map line-item details back to which expense row they belonged to. Click "Download ×21" to get all of them as one concatenated CSV with row separators.
Common pitfalls
Pasting only the `<tr>` rows without the wrapping `<table>` tag. DOMParser silently drops unwrapped `<tr>` because they are invalid outside a table context. Always include the `<table>...</table>` wrapper, even if you have to hand-add it.
Forgetting to turn on "BOM (Excel UTF-8)" when the data has Chinese, Japanese, Korean, or emoji characters. Without BOM, Excel on a non-Western locale opens the CSV as the local code page and you see mojibake. The BOM checkbox fixes it without changing the data.
Choosing "First row" header mode when the first row is actually data. JSON output then uses raw values as object keys (e.g. one key becomes `1`, another becomes `2.50`) which is technically valid but useless. Use "Auto" unless you specifically know the source has no `<thead>` and you have verified the first row is a header.
Expecting nested tables to be flattened into one big table. They are not — each nested table becomes its own entry in the result list, and the parent cell shows `[table #N]`. Use the tab strip above the output to navigate between extracted tables.
Trying to round-trip the resulting CSV back to HTML through the CSV-to-HTML direction and assuming `colspan`/`rowspan` will reappear. They will not: CSV has no concept of merged cells, so the round-trip loses the merge metadata. Keep the original HTML if you need that information later.
Privacy
The whole pipeline (DOMParser → grid model → CSV/TSV/JSON/Markdown serializer) runs as plain JavaScript inside your browser tab. The HTML you paste, the tables we extract, the output you download or copy — nothing is uploaded, nothing is logged. The shareable URL state stores only your output preferences (delimiter, quoting mode, header mode, format), never the HTML itself. This matters because pasted page source frequently contains email addresses, session-bound query strings, internal hostnames, or cookie banners that you wouldn't want to embed in a "share my settings" link. The page works offline after first load — safe to use on an air-gapped laptop for sensitive vendor data.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only