Split Markdown
Cut one document into its sections at the heading level you choose.
Choose a .md or .markdown file. It is read in your browser and never uploaded.
Paste or upload Markdown to see its sections.
Break a long document into its parts
Headings inside code blocks don't split
A line like `## Example` inside a fenced code block is sample text, not a section boundary. The splitter reads fences the same way the Format and Lint tools do, so your code samples stay whole.
Setext headings count too
A heading written as text over `===` or `---` is still a heading. Split catches both spellings, so a document that mixes styles doesn't split half its sections.
Nothing is dropped
The sections are exact slices of your file. Put them back together in order and you get the original back byte for byte — including the text before the first heading, which becomes section one rather than disappearing.
Your file stays on your device
Splitting happens entirely in this browser tab. The file is never uploaded, never stored, and never seen by us.
Questions about splitting Markdown
- What happens to text before the first heading?
- It becomes section one, labelled "Before the first heading". Front matter, an intro paragraph or a badge row all live there. It is never discarded — that would silently lose content.
- Will a heading inside a code block split my document?
- No. Fenced and indented code blocks are treated as literal text, so a `# heading` in a code sample is left alone.
- Are setext headings supported?
- Yes. A line of text underlined with `===` (H1) or `---` (H2) splits exactly like the `#` form. Splitting at H3 is ATX-only, because setext can only spell H1 and H2.
- What if there are no headings at the level I chose?
- You get one section containing the whole document, and a note suggesting a different level. Nothing is lost either way.
- Can I download the sections as separate files?
- Not yet — the sections are shown as copyable blocks. A multi-file download would need a zip library, which is a lot of page weight for text already on screen. If you want it, tell us.
- Do my line endings survive?
- Yes. Sections are sliced straight out of your file, so CRLF endings, trailing spaces and the final-newline state come through untouched.
Need the other direction?
Merge Markdown puts documents back together — also in your browser.
Back to all tools →