⇢

HTML Table to CSV

Extract an HTML table and download it as a CSV file

HTML Table to CSV — what it does

Paste HTML source, pick which table on the page you want by index, and extract it to CSV. Copying a web table into a spreadsheet usually drags in styling, merged layout and hidden markup; going through the source and extracting the cells gives you clean data instead.

When this tool helps

  • Getting a published statistics or pricing table off a page and into a spreadsheet.
  • Extracting a table from an emailed HTML report that has no attachment.
  • Pulling structured data out of a page's saved source for analysis.

How to use it

  1. Paste the HTML source containing the table.
  2. Set the table index if the page has several tables.
  3. Extract the table.
  4. Download the CSV result.

Accuracy, limits, and good practice

  • Index counts tables in source order, so start at the first and step through until the preview matches the table you want.
  • Merged cells flatten during extraction, which can shift values; check the first few rows against the original.
  • Respect the source: check a site's terms before extracting and republishing data you did not create.

Frequently asked questions

Where do I get the HTML source?

View source in the browser, or save the page and open the file — then paste the markup here.

What if the table is built by JavaScript?

You need the rendered markup, not the original source. Copy it from the browser's element inspector instead.

Do header cells become the CSV header?

Header cells appear as the first row of the CSV, which is what any spreadsheet or parser will treat as the header.

Related tools on this site

Everything above runs inside this page. HTML Table to CSV needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

HTML 表格轉 CSV能做什麼

貼上 HTML 原始碼、以索引指定頁面中的第幾張表格,即可抽取成 CSV。直接把網頁表格複製進試算表,常會連樣式、合併版面與隱藏標記一起帶進去;從原始碼抽取儲存格,拿到的才是乾淨資料。

什麼時候用得上

  • 把網頁上公布的統計或價目表抓進試算表。
  • 從沒有附件的 HTML 郵件報表中抽出表格。
  • 從存下的頁面原始碼中取出結構化資料以供分析。

使用步驟

  1. 貼上含有表格的 HTML 原始碼。
  2. 若頁面有多張表格,設定表格索引。
  3. 執行抽取。
  4. 下載 CSV 結果。

精確度、限制與實務建議

  • 索引依原始碼中的表格順序計算,從第一張開始逐一試,直到預覽符合你要的表格。
  • 合併儲存格在抽取時會被攤平,可能造成數值位移;請比對前幾列與原始表格。
  • 尊重來源:抽取並轉發非你創作的資料前,請先確認該網站的使用條款。

常見問題

HTML 原始碼從哪裡取得?

在瀏覽器中檢視原始碼,或把頁面存檔後開啟檔案,再把標記貼過來。

表格是 JavaScript 產生的怎麼辦?

你需要的是渲染後的標記而非原始碼,請改從瀏覽器的元素檢視器複製。

標題儲存格會變成 CSV 標題嗎?

標題儲存格會成為 CSV 的第一列,任何試算表或解析器都會把它當作標題。

本站相關工具

以上步驟全部在這個頁面內完成,HTML 表格轉 CSV 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。