MediaWiki table generator
Build a wikitext table for Wikipedia, Fandom or any MediaWiki site. It is sortable by default, with the wikitable styling, a caption and alignment, and pipes escaped for you.
Build a wikitext table for Wikipedia, Fandom or any MediaWiki site. It is sortable by default, with the wikitable styling, a caption and alignment, and pipes escaped for you.
Loading the table editor… It runs locally in your browser.
{| class="wikitable sortable"
|+ Caption
|-
! Header 1 !! Header 2
|-
| cell || cell
|}The markup is described in the MediaWiki Help:Tables documentation. {| opens the table, |- starts a row, and ! and | start header and data cells.
Set a column to center or right in the grid and each of its cells gets style="text-align:right" |, which works on every MediaWiki skin without extra templates.
Need the data back out of a wiki? Copy the rendered table from the page and paste it into the CSV viewer, or save the page source and use HTML table to CSV.
Wikitext tables start with {| and end with |}. |- starts a new row, ! marks header cells, | marks data cells, and !! or || put several cells on one line. |+ adds a caption. Wikipedia, Fandom and any MediaWiki-based wiki use it.
Add the sortable class next to wikitable: {| class="wikitable sortable". Readers can then click any column header to sort. The generator adds it when “Sortable columns” is ticked.
Write {{!}} instead of |, because a bare pipe starts a new cell. The generator escapes pipes in your text automatically. Line breaks become <br />.
Yes. Copy the cells in Excel or Google Sheets, press “Import data”, paste, and the wikitext is generated. You can also paste CSV or a Markdown table.