How to export a Wikipedia table to a spreadsheet (CSV or Google Sheets)
Wikipedia is full of tidy, sourced tables — List of countries by GDP (nominal), every Grand Slam singles champion, populations, medal counts, box-office rankings. The good news for anyone trying to pull one into a spreadsheet: Wikipedia tables are real HTML <table>s, not JavaScript-rendered grids. That means you have more than one way to get them out — including a free built-in one. The catch is what comes with the data: footnote markers like [1] and numbers formatted with commas that land in your spreadsheet as text. Here's how to get a Wikipedia table into Google Sheets or Excel cleanly.
Option 1: =IMPORTHTML (free, works on Wikipedia)
Because Wikipedia's tables are static HTML, Google Sheets' built-in =IMPORTHTML function genuinely works on them. This is worth knowing — it's free and needs no extra software.
``
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)", "table", 2)
``
The three arguments are the page URL, "table" or "list", and the index (1st table on the page, 2nd, and so on). Wikipedia pages often start with an infobox or a navigation box, so the table you want is rarely index 1 — step through 2, 3, 4 until the right one appears.
It pulls the rows in fine. What it doesn't do is clean them up:
- Footnote markers ride along. A country name imports as
United States[1]and a figure as26,854,599[n 2]. Those bracketed references are part of the page text, so the formula copies them verbatim. - Numbers arrive as text.
26,854,599comes in with its thousands separators, and Sheets treats anything with stray commas or[1]in it as text. You can'tSUM, sort, or chart it until you strip those out by hand.
So IMPORTHTML is a fine free option for Wikipedia's static tables — just expect to do cleanup afterward.
Option 2: copy and paste (and why it fights you)
The obvious move is to select the table on the page and paste it into Sheets or Excel. It sometimes works, but Wikipedia tables are exactly the kind that break it:
- Merged header cells (a column group spanning several sub-columns) scramble the alignment.
- Footnote superscripts and reference numbers paste in as visible
[1]text. - Sortable-table arrows, flag icons, and hidden helper columns come along for the ride.
- Very long lists often select incompletely, so you paste a partial table and don't notice.
You usually spend more time fixing the paste than the paste saved you.
Option 3: a browser extension — clean export in one click
Table to Sheets reads the table directly in your browser, off the page you're already looking at. Open the Wikipedia article, click the toolbar button, and it lists every table on the page so you can pick the exact one you want — no index guessing.
From there:
- Export a clean CSV — free, unlimited. Any HTML table, any number of rows, no cap. The CSV opens straight in Excel, Google Sheets, or Numbers.
- One-click to a new Google Sheet with clean mode — Pro ($5/mo). This is where Wikipedia tables get easy. Clean mode strips the footnote markers like
[1]and[n 2], removes the thousands separators, and sends the figures across as real numbers. SoUnited States[1]becomesUnited States,26,854,599becomes a number you can immediatelySUM, sort, and chart — no find-and-replace.
It runs only when you click (it uses activeTab), reads the page's rendered HTML — no screenshots, no OCR — and doesn't track you. Because it reads the table's real structure, your columns stay aligned.
The honest comparison: for Wikipedia's plain, public tables, IMPORTHTML already does the fetching for free, and you can clean up the footnotes and commas yourself. The extension's edge is doing that cleanup automatically in one click — and the fact that the same button also works on the many sites where IMPORTHTML fails (JavaScript-rendered dashboards, stats pages, and anything behind a login), which Wikipedia happens not to be.
The short version
- Wikipedia tables are real HTML, so free
=IMPORTHTML("...page...", "table", N)works — just try a few index numbers, and expect[1]footnotes and comma-formatted text numbers. - Copy-paste struggles with merged headers, footnotes, and icons; long tables often select incompletely.
- Table to Sheets exports any table to a clean CSV free; its Pro clean mode strips footnotes and commas so numbers import as real numbers, in one click to a new Google Sheet.
Get Table to Sheets — free
Export any table on any web page to a clean CSV in one click. Free and unlimited — no row caps. One click to Google Sheets with Pro.
Add to Chrome