How to Use the Markdown Table Validator: Step-by-Step Tutorial
The Markdown Table Validator runs entirely in your browser โ no file is uploaded to any server, no account is required, and no data leaves your machine. This tutorial walks through every step of using the tool: loading your Markdown table, reading the results panels, understanding each type of issue reported, and fixing the most common problems encountered in Markdown table syntax.
Follow along with the tool open: Open the Markdown Table Validator in a second tab, then work through each step below.
Open Markdown Table Validator โTable of Contents
- Step 1 โ Open the Tool
- Step 2 โ Load Your Markdown Table
- Step 3 โ Run Validation
- Step 4 โ Read the Status Bar
- Step 5 โ Review the Error Panel
- Step 6 โ Review the Warning Panel
- Step 7 โ Review the Info and Preview Panels
- Step 8 โ Fix Issues and Re-Validate
- Worked Examples
- Tips and Edge Cases
Step 1 โ Open the Tool
Navigate to /developer-tools/markdown-table-validator/. The tool loads entirely in the browser. There are no cookies set, no account required, and no network requests made after the initial page load. You can verify this by checking the Network tab in browser DevTools โ after the page loads, validating a file generates zero outbound requests.
The tool is accessible from the Developer Tools hub, the command palette (press Ctrl+K or โK and type "Markdown Table Validator"), or directly via the URL above.
Step 2 โ Load Your Markdown Table
There are two ways to get your table into the validator:
Option A โ Paste directly. Click inside the "Markdown Table" text area and paste your Markdown table source. This is the fastest method for tables you have in a text editor, a GitHub comment, or a copied README section. The text area accepts any number of rows.
Option B โ Drop a file. Drag a .md or .markdown file from your file manager and drop it anywhere on the page. A drop zone with a file icon accepts files up to 10 MB. The file is read by the browser's FileReader API and never transmitted anywhere. Once loaded, the filename appears below the drop zone with an option to remove it and start over.
If you drop a file of the wrong type โ a .txt that is not Markdown, or a non-text file โ the validator shows a "Wrong file type" error directly in the interface and clears the input, so you can try again without refreshing the page.
Step 3 โ Run Validation
Once your content is in the text area or a file is loaded, click the Validate Table button. Validation runs synchronously in JavaScript โ for any reasonably sized Markdown file, results appear instantly. There is no progress indicator because the processing is fast enough not to need one.
You can also click the Clear button at any time to reset the text area, remove any loaded file, and clear all result panels back to their initial state. This is useful when you want to test a second table without refreshing the page.
Step 4 โ Read the Status Bar
Immediately below the button row, a status bar appears after each validation run. It comes in three states:
- Green (โ Valid Markdown table โ no issues found.) โ The table passed all structural checks with no errors and no warnings. It is safe to use.
- Yellow (โน Valid Markdown table โ N warning(s). See details below.) โ The table is structurally valid and will render, but there are non-fatal issues worth reviewing. The warning panel below will have details.
- Red (โ Validation failed โ N error(s) found.) โ The table has at least one structural error that will prevent it from rendering correctly in a Markdown processor. The error panel below will have specific details including line numbers.
The status bar is the first thing to check. If it shows green, you are done. If it shows yellow or red, continue reading the panels below it.
Step 5 โ Review the Error Panel
The error panel appears in red below the status bar whenever the validator finds structural problems. Each error message includes the specific issue and, where applicable, the line number where it was found. Common errors you will encounter include:
"No Markdown table found." โ The pasted text or file contains no lines with pipe characters. Check that you pasted the correct content and that the table uses pipe syntax.
"Table has only N row(s). A valid Markdown table needs at least a header row and a separator row." โ There are not enough rows for a complete table. A valid Markdown table needs at minimum two rows: a header row and a separator row. If you pasted only the header row, add the separator row and try again.
"Separator row (line N), column N: invalid separator cell 'X'." โ The separator row (the second row) contains a cell that does not consist of only dashes and optional colons. Common causes: accidentally including a letter or digit in the separator, using a colon in the middle of a cell, or leaving a separator cell completely empty. Fix: each separator cell must match the pattern -{1,} optionally preceded and/or followed by a colon โ for example ---, :---, ---:, or :---:.
"Separator row (line N) has X column(s) but the header row has Y." โ The number of cells in the separator row does not match the header row. Count the pipe characters in both rows and add or remove separator cells until the counts match.
"Row at line N has X cell(s) but expected Y (header column count)." โ A data row has a different column count than the header. Common causes: an unescaped pipe character inside a cell, a missing pipe at the end of a row if you are using the trailing-pipe style, or a copy-paste error. Find the specific line and compare its pipe count to the header row.
Step 6 โ Review the Warning Panel
The warning panel appears in yellow whenever the validator finds non-fatal issues โ problems that may not prevent the table from rendering but indicate a structural concern. Each warning is listed as a bullet point. Common warnings include:
"Duplicate column header(s): 'X'." โ Two or more columns share the same header name (case-insensitive). The table will render, but any tooling that references columns by name may behave unexpectedly. Fix: rename one of the duplicate headers to be unique.
"N empty column header(s) in the header row." โ One or more header cells are blank. The columns will render as invisible in most Markdown processors. Fix: add a descriptive name to each blank header cell.
"Leading pipe (|) is inconsistent across rows." or "Trailing pipe (|) is inconsistent across rows." โ Some rows start or end with a pipe and others do not. While most Markdown processors accept this, the inconsistency can cause rendering differences. Fix: choose one style (with or without leading/trailing pipes) and apply it uniformly across all rows.
"N blank row(s) found at line(s): N." โ A row inside the table block contains no content. Blank rows inside a table block terminate the table in most processors โ rows after the blank line will not be part of the table. Fix: remove the blank rows.
Step 7 โ Review the Info and Preview Panels
When the table is valid (with or without warnings), three additional panels appear below the warning panel:
Stats panel (green). Shows six statistics about the validated table: the number of data rows, the column count, the number and percentage of empty cells, the number of blank rows, the input size, and the number of columns with custom alignment. These are informational โ they help you understand the shape of your table at a glance.
Column Headers panel. Lists every column with its index number, header text, and detected alignment badge. Alignment is read from the separator row: a leading colon means left, a trailing colon means right, colons on both ends mean center, and no colons mean default. Use this panel to verify that the alignment markers in your separator row produced the alignment you intended.
Data Preview panel. Renders the first five data rows in a formatted table with alignment applied per column. This gives you a visual check that the table structure looks correct before you commit it to your documentation.
Step 8 โ Fix Issues and Re-Validate
After identifying errors or warnings, go to the source file (your Markdown file, README, or documentation page), make the necessary corrections, then return to the validator. Clear the previous input with the Clear button, paste or drop the corrected content, and click Validate Table again. Repeat until the status bar shows green.
For files that are part of a Git repository, it is worth committing only after validation confirms the table is clean. This prevents broken table syntax from appearing in commits and avoids the embarrassment of a malformed table appearing in a published README.
Worked Examples
Example 1 โ Missing separator row.
Input:
| Name | Role |
| Alice | Admin |
| Bob | Editor |
Result: Error โ "Table has only 3 row(s). A valid Markdown table needs at least a header row and a separator row." Wait โ the table actually has 3 rows, so why this error? Because none of the rows contain only dashes. The validator sees 3 pipe-containing lines but identifies no valid separator row at position 2. Fix: insert a separator row as the second row:
| Name | Role |
|-------|---------|
| Alice | Admin |
| Bob | Editor |
Re-validate: green.
Example 2 โ Column count mismatch in a data row.
Input:
| Country | Capital | Population |
|---------|---------|------------|
| France | Paris | 68M |
| Germany | Berlin |
| Italy | Rome | 59M |
Result: Error โ "Row at line 5 has 2 cell(s) but expected 3." The Germany row is missing the Population cell. Fix: add the missing cell:
| Country | Capital | Population |
|---------|---------|------------|
| France | Paris | 68M |
| Germany | Berlin | 84M |
| Italy | Rome | 59M |
Re-validate: green.
Example 3 โ Invalid separator cell.
Input:
| Tool | Category |
|---------|Developer--|
| Regex | Dev |
Result: Error โ "Separator row (line 2), column 2: invalid separator cell 'Developer--'." The second separator cell contains letters. Fix: replace with a valid separator:
| Tool | Category |
|---------|-----------|
| Regex | Dev |
Re-validate: green.
Example 4 โ Right-alignment verification.
Input:
| Item | Price |
|:---------|-------:|
| Widget | $9.99 |
| Gadget | $24.99 |
Result: Valid. The Column Headers panel shows "Item" with a left-alignment badge and "Price" with a right-alignment badge. The Data Preview renders the Price column right-aligned. This confirms the separator markers are working as intended.
Tips and Edge Cases
Validating a table inside a larger Markdown file. The validator extracts the first contiguous block of pipe-containing lines it finds. If your file contains prose before the table, that prose will be ignored. If your file contains multiple tables, only the first table is validated. To validate a second table, copy only its rows into the text area.
Pipe characters inside cells. A literal pipe inside a cell value must be escaped as \|. An unescaped pipe will be interpreted as a column delimiter, causing the column count for that row to be off by one. If you see a column count mismatch on a specific row and cannot see why, check whether the row contains an unescaped pipe in its content.
Testing alignment without rendering. If you want to confirm what alignment a separator row produces without opening a Markdown renderer, paste just the header and separator rows (two lines) and click Validate Table. The Column Headers panel will show the alignment badge for each column.
Large files. The tool accepts files up to 10 MB. For very large Markdown files containing many tables, the validator reads and checks the first table it finds. The 10 MB limit is rarely approached in practice โ a file that size contains millions of characters, far more than any realistic documentation page.
Re-validating after edits. After fixing an issue in your source file, use the Clear button to reset the tool, then paste or drop the updated content. Pasting over existing content without clearing works as well โ the text area accepts overwritten paste and the previous validation state is replaced when you click Validate Table again.
