Transpose a Markdown Table
Swap the rows and columns of a Markdown table in one click, turning a wide table into a tall one or the reverse.
Paste cells from Excel or Google Sheets into the first header to replace the table · Tab / Enter / arrows move · Shift+F10 opens row & column actions
How to transpose a Markdown table in 3 steps
Paste the table
Press Ctrl+V (⌘V) anywhere on the page outside a text box, or paste into the Markdown or Import tab. CSV and spreadsheet cells work too.
Click Transpose
Rows become columns and columns become rows. The old header row becomes the first column, and the first column becomes the new header.
Fix alignment and copy
Alignment is reset because columns now hold different data; use Tools › Auto-align or the column menu, then click Copy Markdown.
Example
| Plan | Price | Seats | Storage | SSO | | :-- | --: | :-: | --: | :-: | | Free | $0 | 1 | 5 GB | No | | Pro | $12 | 10 | 100 GB | No | | Business | $40 | 50 | 1 TB | Yes |
| Plan | Free | Pro | Business | | ------- | ---- | ------ | -------- | | Price | $0 | $12 | $40 | | Seats | 1 | 10 | 50 | | Storage | 5 GB | 100 GB | 1 TB | | SSO | No | No | Yes |
Options explained
- Transpose
- Flips the table along its diagonal. Click it again to flip back (alignment is not restored).
- Tools
- Follow-up fixes after transposing: auto-align columns, change header case, or clean the table.UPPER · lower · Title Case · Auto-align · Transpose · Quick clean · Deep clean
- Grid / Markdown / Import tabs
- Edit the result in the grid, see or edit the Markdown source, or import CSV, TSV, HTML, JSON or a spreadsheet file to transpose.
- Spacing and Flavor
- How the output is written. Defaults (GFM, Padded) suit GitHub and most editors.Padded · Compact · No outer pipes · GFM · MultiMarkdown · Pandoc Pipe · reStructuredText · Org-mode
- Output format and Download
- Copy the transposed table as Markdown, HTML, CSV, TSV, JSON, LaTeX, SQL or Jira, or download .xlsx, CSV or PNG.
Related tools
Also useful
Next steps
- Markdown Table FormatterAlign columns and pad cells so the raw table is readable.
- Markdown Table ValidatorFind broken delimiter rows, column mismatches and unescaped pipes.
- Markdown Table SorterSort rows alphabetically or numerically by any column.
- Markdown Table EditorPaste an existing Markdown table and edit cells visually.
- Markdown Table to ImageRender the table as a PNG or SVG for slides and posts.
Convert Markdown to…
- Markdown Table to CSVExport a Markdown table as RFC 4180 CSV.
- Markdown Table to TSVCopy as tab-separated values that paste cleanly into Excel and Sheets.
- Markdown Table to HTMLExport semantic <table> markup.
- Markdown Table to JSONExport rows as an array of JSON objects.
- Markdown Table to LaTeXExport LaTeX tabular code for papers and Overleaf.
Convert to Markdown from…
- CSV to Markdown TableConvert CSV text or .csv files, including quoted cells.
- Excel to Markdown TablePaste cells copied from Excel straight into a Markdown table.
- Google Sheets to Markdown TablePaste a copied range or a public sheet URL.
- TSV to Markdown TableConvert tab-separated text into a Markdown table.
- HTML Table to MarkdownConvert <table> markup into a Markdown table.
About this tool
A comparison table with many columns and a few rows scrolls sideways on GitHub and on phones; the same data transposed reads top to bottom. Paste the table and click Transpose to swap rows and columns. The old header names become the first column, the first column becomes the new header, and every cell keeps its content.
- Swaps rows and columns in one click
- Old header becomes the first column; first column becomes the header
- Keeps cell content, links, code and <br> as written
- Works on pasted Markdown, CSV, TSV, HTML or spreadsheet cells
- Auto-align the result in one more click
- Runs in your browser; nothing is uploaded
Technical details
What happens to the header when you transpose
A Markdown table always has exactly one header row, so transposing has to decide what the new header is. The tool treats the header as row zero: after flipping, the old header names run down the first column, and the values that were in the first column run across the new header.
- Shape: An M-row × N-column table (plus header) becomes an N-row × M-column table (plus header) after transposing; the header names become the first column.
- Header choice: Put the labels you want as new column titles in the first column before transposing (for example plan names in a pricing table).
- Alignment: Reset to default, because a column that was numeric is now spread across a row.
- Content: Cell text, including Markdown formatting, is moved unchanged.
Common problems and fixes
The new header row is full of IDs or numbers
Cause: The first column of the original table held IDs, so they became the header.
Fix: Move a descriptive column to the first position (▾ menu › Move column left) and transpose again.
A new header is called “Column 3”
Cause: The original first column had an empty cell in that row, so the new header had no name and got a placeholder.
Fix: Click the header cell in the grid and type a label.
Frequently asked questions
How do I swap rows and columns in a Markdown table?
Paste the table on this page (Ctrl+V or ⌘V outside a text box) and click Transpose, then copy the Markdown. Markdown has no transpose syntax, so the table has to be rewritten; the tool does that for you.
What happens to the header row?
The old header names become the first column, and the values from the old first column become the new header. Put the labels you want as column titles in the first column before transposing.
Why did my column alignment disappear?
Alignment belongs to a column, and after transposing each column holds different kinds of data, so it is reset. Use Tools › Auto-align to right-align numeric columns again, or set alignment from the ▾ menu.
When should I transpose a table?
When it is much wider than it is tall: a few items compared on many attributes, or a single record with many fields. Tall tables are easier to read on narrow screens and produce smaller diffs when a value changes.
Can I transpose CSV or spreadsheet data?
Yes. Paste CSV, TSV or cells copied from Excel or Google Sheets (or upload a file from the Import tab), click Transpose, and copy the result as Markdown or switch the output to CSV.
Can I undo a transpose?
Yes. Click Transpose again to flip it back, or press Ctrl+Z (⌘Z). Only alignment is not restored by flipping back; undo restores it.
Is my table uploaded?
No. Transposing runs in your browser; the table is not sent to a server.