1. Home
  2. Writing & text tools
  3. CSV to MediaWiki Table Converter

CSV to MediaWiki Table Converter

Add a data table to a Wikipedia article, a Fandom wiki or a company MediaWiki without hand-writing pipes and exclamation marks.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use CSV to MediaWiki Table Converter

  1. Paste cells or open a CSV or Excel file.
  2. Choose sortable, captions, row headers and alignment.
  3. Copy the wikitext into the edit box.

Features

  • {| class="wikitable sortable" markup
  • Caption and first-column row headers for accessibility
  • Number columns right-aligned
  • Compact || rows or one cell per line
  • Pipes inside cells escaped so the table never breaks

Supported formats

You can open

  • Pasted cells
  • CSV
  • TSV
  • XLSX

You get

  • Wikitext

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the CSV to MediaWiki Table Converter is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Very large files are limited by your device’s memory; on a phone, split huge files into smaller parts first.

Guide

Spreadsheet data as a MediaWiki table

Tables on Wikipedia and other MediaWiki sites are written in wikitext, a compact syntax of braces, pipes and exclamation marks. It is quick once learned, but typing a large table by hand is slow and one stray pipe can shift every column after it. This converter takes data from a spreadsheet or CSV file and writes the markup for you.

How wikitable markup works

A table starts with {| and ends with |}. The class wikitable gives the standard grey-bordered look. |+ adds a caption, |- starts a new row, ! starts a header cell and | a data cell. Cells on the same line are separated by !! or ||. An attribute such as an alignment goes before a single pipe at the start of a cell: style="text-align:right" | 42.

Sortable tables

Keep “Sortable columns” on and the table gets the sortable class; readers can then click any header to sort. MediaWiki recognises numbers with thousands separators, dates and percentages, so a population column sorts numerically, not alphabetically.

Accessibility: captions and row headers

Wikipedia’s accessibility guidance asks data tables to have a caption describing them and, where each row is about one thing, a row header. Type a caption, and turn on “First column as row headers” for tables like a list of countries: the first cell of each row becomes a header with scope="row", so screen readers announce it when moving along the row.

Numbers and alignment

Columns holding only numbers are right-aligned when that option is on, which makes digits line up. The alignment is written per cell, so it survives sorting and copying.

Escaping and line breaks

Because pipes separate cells, a value containing one — a song title, a command, a ratio written a|b — would break the table. Each pipe inside a value is written as {{!}}, a magic word every MediaWiki site provides for a literal pipe. Line breaks inside a spreadsheet cell become <br />.

Compact or one cell per line

The compact style puts each row on one line, which is easy to scan when cells are short. One cell per line is easier to edit and to compare in the page history when cells hold long text or references. Both render the same.

A worked example

The sample lists the four most populous countries. Its header becomes ! Rank !! Country !! Population (2024) !! Capital, and the first data row reads | style="text-align:right" | 1 || India || style="text-align:right" | 1,450,935,791 || New Delhi.

Editing etiquette on Wikipedia

Cite the source of the data in the caption or in a reference after it, and preview before saving. Very wide tables are hard to read on phones, so consider splitting one with many columns.

Preparing the spreadsheet

Tidy the data before converting: one header row, no blank rows or columns, no merged cells, and consistent units in each column. Format numbers the way they should appear in the article, with thousands separators if the article uses them, because the values are copied exactly as they are in the cells.

Cite the data source with the Wikipedia Citation Generator, make LaTeX tables with CSV to LaTeX, HTML tables with CSV to HTML Table, or convert pasted terminal tables with the ASCII Table Converter.

Checked against the current version of the CSV to MediaWiki Table Converter on .

Troubleshooting

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Does this work on Fandom and other wikis?

Yes. Fandom, company wikis and every other MediaWiki site use the same table syntax and the wikitable class. Sorting needs the sortable script, which Wikipedia and Fandom load by default; a private wiki may need it enabled.

How do I merge cells?

Add rowspan or colspan by hand after converting: write the attribute before a pipe at the start of the cell, as in colspan="2" | text, and delete the cells it covers. Spreadsheets do not export merged cells, so this cannot be automated from CSV.

Can I paste the table in the visual editor?

Wikitext belongs in the source editor. In the visual editor you can paste cells from a spreadsheet directly instead, and it creates the table itself; the generated markup is for source mode.

How do I make the table sortable?

Keep “Sortable columns” on. It adds the sortable class, and MediaWiki shows sort arrows in each header. Numbers with thousands separators sort correctly on Wikipedia.

Why are pipes inside cells escaped?

In wikitext a pipe separates cells and attributes, so a pipe inside a value would break the table. It is written with the exclamation-mark magic word in double braces, a built-in template that displays a pipe.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.