Fix Markdown Headings and Tables Before Converting to Word
Fix heading levels, table syntax and list indents in a Markdown file so the Word export keeps its outline, using the UniDoc web editor.
If you have converted a document to Markdown and then sent it to Word, you may have seen the structure fall apart. Every section looks the same size, a table turns into a column of stray characters, and a nested list flattens into one level. This guide is for writers, students and analysts who need to know how to format Markdown so the Word file keeps its outline.
Markdown is plain text with light symbols for structure. A line that starts with one # is a top-level heading, two ## marks the next level down, and a hyphen or number starts a list item. Word does not read those symbols directly. An editor or converter has to turn them into heading styles, table objects and list formatting, so the cleanup belongs in the Markdown, while the file is still plain text and easy to check.
The steps below use the UniDoc web editor at app.unidoc.top, which supports Markdown and a Word round trip. You will fix heading levels, table syntax and list structure, export, and then check the result.
How to format Markdown so the Word file keeps its outline? The short answer
Fix the structure in the Markdown first, export through the UniDoc web editor, and check the outline in Word before you share the file.
| Your situation | What to do | Why |
|---|---|---|
| All headings look the same size in Word | Use one # for the title, then ## for sections and ### for subsections, without skipping levels | Heading levels become Word heading styles, which form the outline |
| A table shows as raw text | Add a header row and a separator row of dashes, with the same number of cells in every row | Without the separator row, the block is not read as a table |
| Nested bullets flatten to one level | Leave a blank line above the list and indent sub-items by the same amount each time | Indentation sets the nesting depth |
| Stray symbols appear in the output | Remove leftover asterisks, backslashes and extra markers in the source | Symbols the converter did not consume print as literal characters |
| Paragraphs run together | Put a blank line between paragraphs, headings, tables and lists | Markdown joins unbroken lines into one paragraph |
Before you start
- Keep a copy of the original Markdown file. You can compare the result against it and undo edits if a fix causes a new problem.
- Write down your intended outline. A short list of the headings and subheadings lets you spot skipped levels quickly.
- Test with a small file first. Paste a short document with one heading, one table and one nested list into the UniDoc web editor. If that works, the full file is more likely to work too.
- Have Word open for checking. You need to see the real outline and table layout in the program you plan to share with, not just in the editor.
- Set aside time to read the output. Converters can misplace a table or a list. Reading the final file takes a few minutes and prevents a flawed version from going out.
Cleaning up Markdown headings, tables and lists, step by step
- Fix the heading levels. Start with one top-level heading for the title, then use ## for main sections and ### for subsections. Going straight from # to ### skips a level, and Word will show that gap in the outline.
- Rebuild each table. Put a header row first, a separator row of dashes underneath, and the same number of cells in every row. A table missing its separator row stays as plain text.
- Check list indentation. Put a blank line above every list, use one marker style within each list, and indent sub-items under their parent by a consistent amount. Mixed indents make items jump between levels.
- Separate blocks with blank lines. Leave one blank line between paragraphs, headings, tables and lists. Without them, Markdown merges neighboring lines and the Word output looks crowded.
- Open the file in the UniDoc web editor. Go to app.unidoc.top and load your cleaned Markdown. Keep the original file unchanged in case you need to start over.
- Scan the rendered blocks. Look at each heading, table and list as the editor displays it. If any block still shows raw symbols, return to the source and fix that block before exporting.
- Export through the Word round trip. Use the editor's Word round trip to produce a Word file, then open that file and move to the next section to check it.
Check the result
Once you have the Word file, check the points below. Fixing problems in the Markdown source and exporting again is usually faster than editing the Word file by hand.
| Check | How to see it | If it's wrong |
|---|---|---|
| Heading outline | Open the navigation or outline view in Word and compare it with your planned outline | Find the skipped level in the Markdown, correct it, and export again |
| Tables | Confirm each table has rows and columns, with no stray pipes or dashes visible as text | Add the missing separator row and recount the cells in each row |
| Nested lists | Check that each sub-item sits one level under its parent | Re-indent the items by the same amount and use one marker style per list |
| Leftover symbols | Search the Word file for hash signs, asterisks and backslashes | Remove them in the Markdown, then export again so the fix carries over |
| Content | Compare figures, names and key claims with the original source | Correct the source text, then export again; check important content yourself rather than assuming it is right |
❓ FAQ
1. What is Markdown formatting?
Markdown formatting is a set of plain-text symbols that mark structure: # for headings, hyphens or numbers for lists, dashes between pipe-separated cells for tables, and asterisks for emphasis. The file stays readable as plain text, and an editor or converter turns the symbols into styled output.
2. Why does my Word file lose its heading levels?
The usual causes are a skipped level, such as jumping from a top-level heading straight to a third-level one, or headings written as bold text instead of # symbols. Bold text looks like a heading but carries no outline level, so Word cannot include it in the outline.
3. Do I need to know Markdown syntax in depth to fix these problems?
No. You need only a few marks: heading symbols, the separator row in a table, consistent list indentation and blank lines between blocks. Those cover most of the problems that break structure on export.
4. Can I apply these fixes to a converted PDF?
Converted files often need this cleanup because the converter has to guess the structure. Run the same checks on the converted Markdown before you export, and fix the headings, tables and lists first.
📝 Summary
Learning how to format Markdown before export means giving the file one clear outline, complete tables and consistent lists. Word keeps only the structure the symbols describe, so fix the source first. Then check the outline, tables and lists in the Word file, and correct any problems in the Markdown and export again.


