Merge Markdown Tables
Combine two Markdown tables into one: stack their rows, or put their columns side by side.
Columns are matched by header name (ignoring case and spacing). A column that only one table has is added, with blank cells for the other table's rows.
| ID | Employee | Department | | :-- | :------- | :---------- | | 1 | Alice | Design | | 2 | Bob | Sales | | 3 | Charlie | Engineering | | 4 | Diana | Operations |
How to merge two Markdown tables in 3 steps
Paste both tables
Paste the first table into Table A and the second into Table B. Each box reads the first pipe table in what you paste.
Choose how to merge
Append Rows stacks B’s rows under A’s, matching columns by header name. Join Columns puts B’s columns to the right of A’s, pairing rows on a key column (inner or left join) or, with no key, by row number.
Copy the merged table
The merged Markdown updates as you type. Click Copy Merged Table. To merge a third table, paste the result into Table A and the next table into B.
Example
| Month | Signups | Churn | | :-- | --: | --: | | Jan | 1,204 | 2.1% | | Feb | 1,377 | 1.9% | | Month | Signups | Churn | | :-- | --: | --: | | Mar | 1,512 | 1.7% |
| Month | Signups | Churn | | :---- | ------: | ----: | | Jan | 1,204 | 2.1% | | Feb | 1,377 | 1.9% | | Mar | 1,512 | 1.7% |
Options explained
- Append Rows (Stack Tables)
- Uses Table A’s header and alignment, then lists A’s rows followed by B’s. Columns are matched by header name (ignoring case and spacing), so a different column order is fine. A column only B has is added with blank cells for A’s rows, and A-only columns are blank for B’s rows. Table B’s header row is dropped.Default
- Join Columns (Side-by-Side)
- Places B’s columns after A’s. Pick the key column in each table (Auto uses the first header they share) and Left (keep every row of A) or Inner (only matching keys). The key column appears once, one-to-many matches give one row per match, and a B column whose name clashes with one in A gets “ (B)”. With Row number instead of a key, row 1 of A is joined with row 1 of B, row 2 with row 2, and so on.
- Table A / Table B
- Plain Markdown inputs. Ragged rows are padded, and escaped pipes and alignment colons are kept.
- Copy Merged Table
- Copies the merged table as padded GFM Markdown.
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 TransposeSwap rows and columns.
- Markdown Table EditorPaste an existing Markdown table and edit cells visually.
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
Combining tables by hand means re-typing a header, re-padding every row and recounting pipes. Paste two Markdown tables and pick a strategy: Append Rows stacks the second table under the first and matches columns by header name, for example adding March to a January–February report; Join Columns places the second table’s columns to the right of the first, pairing rows on a key column such as an ID, for example adding a revenue column to a signup table. The result is a single valid GFM table you can copy.
- Stack two tables’ rows under one header
- Join two tables’ columns side by side, or on a key column (inner or left)
- Append matches columns by header name and adds missing columns
- Keeps Table A’s header and column alignment
- Pads short rows so the result is always a valid table
- Live output; copy as padded GFM
- Runs in your browser; nothing is uploaded
Technical details
How rows and columns are matched
Append matches columns by header name and Join can pair rows on a key column, so the tables do not need the same column or row order. Without a key, Join falls back to pairing rows by position.
- Append: Each column of B goes under the column of A with the same header (trimmed, ignoring case). Columns only B has are added after A’s with B’s header, and rows from the other table get blank cells there. A repeated header matches in order.
- Join: With a key, each row of A is paired with the rows of B that have the same key (trimmed, ignoring case); blank keys never match. Left keeps A rows with no match, filled with blanks; Inner drops them. Without a key, rows are paired by position, and short rows are padded first.
- Header and alignment: The result uses A’s header names and alignment for A’s columns, and B’s for B’s columns when joining.
- Duplicates: Nothing is removed. Run the result through the Cleaner with Deduplicate Rows to drop repeated rows.
Common problems and fixes
Appended rows ended up in a new column
Cause: Table B’s header differs from Table A’s (a typo, an extra word or a renamed column), so it is treated as a different column and added.
Fix: Make the header names match in both tables (case and spacing are ignored), then paste again.
Joined rows do not line up
Cause: Rows are paired by row number because no key column is selected, and the tables are in a different order or one has an extra row.
Fix: Choose a key column in each table, or sort both by the same column first.
The same column appears twice after joining
Cause: Both tables include another column with the same name. The key column is written once, but other clashing names from B get “ (B)”.
Fix: Rename or delete the duplicate column in Table B before merging, or remove it afterwards in the Editor.
Frequently asked questions
How do I combine two Markdown tables into one?
Paste one table into Table A and the other into Table B, choose Append Rows to stack them or Join Columns to place them side by side, and click Copy Merged Table. The result has one header and a valid delimiter row.
Do the column names have to match?
For Append Rows, columns are matched by header name (ignoring case and spacing), so the order can differ; a column only one table has is added, with blank cells for the other table’s rows, and Table B’s header row is dropped in favour of Table A’s. For Join Columns, B’s columns are added after A’s, and the key column appears only once.
Can I join tables on a key column like ID?
Yes, for one key column. Choose the key column in Table A and Table B (Auto uses the first header they share) and a Left join (keep every row of A) or an Inner join (only matching keys). Keys are compared after trimming and ignoring case, and several matches in B give one row each. For several key columns or right and full joins, a spreadsheet XLOOKUP or pandas merge is the better tool.
What happens if the tables have different numbers of rows or columns?
The result is padded so it stays a valid table: missing cells are left empty. When appending, extra columns in B are added with B’s header names.
Can I merge more than two tables?
Yes, one pair at a time: copy the merged result, paste it into Table A, paste the next table into Table B, and merge again.
Are duplicate rows removed?
No. Merging keeps every row. Paste the result into the Cleaner and run Deep clean, or tick only Deduplicate Rows, to remove repeats.
Is my data uploaded?
No. Both tables are merged in your browser and nothing is sent to a server.