Back to blog
Tutorials
markdown page break
page break in markdown pdf
markdown to word page break
pagination

How to Add a Page Break in Markdown (PDF & Word)

Use the supported Markdown page-break comment for DOCX and PDF, distinguish it from line breaks and rules, and troubleshoot pagination.

Updated October 21, 20264 min readMarkdown to Word Team

Markdown has no standard page-break token. A break only works when the converter recognizes a convention and translates it into the output format. On this site, use <!-- pagebreak --> on its own line to begin a new page in DOCX or direct PDF export.

A page-break example for this converter

Paste this into the Markdown to Word converter or the Markdown to PDF tool:

# Review brief

Summary for the first page.

<!-- pagebreak -->

## Appendix

Details that should begin on a new page.

Leave blank lines around the comment. The intended result is an Appendix starting on a fresh page. The Word exporter writes a native page break; the PDF exporter uses the marker when deciding where to divide the rendered content.

The browser preview is a continuous document, so use the downloaded file to check pagination. Word may repaginate other content when the font, margins, or paper size change.

Which markers are recognized here?

SourceBehavior in this site's DOCX and PDF export
<!-- pagebreak -->Explicit page break
<!-- page-break -->Explicit page break
<div style="page-break-before: always;"></div>Explicit page break
<div style="break-after: page;"></div>Explicit page break
--- or ***A thematic rule, not a page break
<br> or a hard Markdown line breakA new line within content, not a new page
\newpageNot a supported page-break command here

The supported HTML styles include page-break-before or page-break-after with always, and break-before or break-after with page. This is specific handling for pagination; it does not mean arbitrary inline CSS survives conversion.

There is no need to add --- before a page-break comment. Doing so adds a visible rule as well as the break. Put the comment immediately before the section that needs a fresh page.

How this differs from other Markdown workflows

A tool using LaTeX to create PDF may recognize a raw \newpage command. A browser print workflow may honor CSS break properties. Neither behavior is guaranteed in an unrelated Markdown-to-DOCX converter.

Do not wrap a LaTeX command in an HTML comment and assume a converter will execute it. That requires explicit support or a custom processing step. Use the documented marker for the tool that produces your final file, and verify it on a two-section sample first.

Troubleshoot a break that did not work

The marker is visible as code. Remove surrounding backticks or indentation that makes it a code block. A page-break example inside a fenced block is deliberately treated as text.

Only a horizontal line appeared. A thematic rule is not a pagination instruction. Replace it with the supported comment if you intended a new page.

The heading is still on the previous page. Place the marker before the heading, not after it. Re-export and open the newly downloaded file rather than an older copy.

A table or code block still crosses pages. An explicit break can move the start of a block, but it cannot make a block taller than one page fit on that page. Split long tables, shorten examples, or adjust the final Word layout.

The PDF text cannot be selected. That is unrelated to the marker. The direct PDF export captures page images and does not include a text layer. Use a text-preserving PDF workflow when selection, search, or accessibility is required.

A final pagination check

  1. Choose a short document with two named sections and a single break.
  2. Export and verify that the second section begins on a new page.
  3. Add the same marker to the full document only where a new page is necessary.
  4. Inspect long tables, images, and code blocks in the final file.
  5. Recheck after changing Word's margins, fonts, or paper size.

Keep page-break instructions sparse. Structural headings remain useful on every device, while manual page breaks are decisions about one particular document layout.

Related articles