Markdown files: plain text with conventions, and there is more than one of them
What a .md file is, why no two renderers agree on it, and how headings and lists are rebuilt from a PDF that never recorded any. Convert in your browser.
At a glance
- Type
- Documents
- Extensions
- .md, .markdown
- MIME type
- text/markdown
- Also known as
- MD
A .md file is a text file. There is no container, no compression and nothing binary in it — open one in Notepad and you see exactly what it holds. The formatting is convention rather than markup: a # at the start of a line means a heading, a hyphen means a list item, and a renderer that understands the convention turns them into HTML. That is the whole idea, and it is why the format has outlasted every rich-text editor of its generation: the file is readable before anything renders it, and it will still be readable when whatever you wrote it in is gone.
Read more
The complication is that there is no single Markdown. The original 2004 implementation left a great many cases undefined, so every renderer settled them differently; CommonMark exists to pin those ambiguities down, and GitHub Flavored Markdown builds tables, task lists and strikethrough on top of it. The situation is formally acknowledged: when text/markdown was registered as a media type in RFC 7763 in March 2016, the registration included a variant parameter, precisely because saying a file is Markdown does not say which Markdown it is. What this site emits is text/markdown with UTF-8, and it uses only constructs every dialect agrees on — hash headings, blank-line paragraphs, hyphen bullets and horizontal rules.
Converting a PDF into Markdown means manufacturing structure that the PDF never had. A PDF records type sizes, not headings, so the sizes on the page are ranked and the largest six become the six heading levels; a line that is merely bigger than the body text becomes a heading whether or not the author thought of it as one. Lists are worse: PDF has no list construct at all, and the bullet you see is literally a character in the text, so the only way a list survives is to recognise that character and rewrite it as a hyphen. Numbered items need no such help — "1. " and "1) " are already Markdown, and already meant as a list.
Two details are worth knowing because they change the text itself. A line ending in a hyphen is treated as a word broken across the line break and rejoined without it; and consecutive lines of Chinese or Japanese are joined with no space between them, because those scripts do not put one there. Pages are separated by a horizontal rule, so a thirteen-page document arrives with twelve of them. If the PDF is a scan with no text layer, the same recognition model used for PDF to Word reads the characters off the page images first, on your own machine.
Convert other formats to Markdown
FAQ
Is a .md file just a text file?
Yes. No container, no compression, nothing binary. Any text editor opens it, and the markers — #, -, ** — are ordinary characters you can read as they are.
Which flavour of Markdown do I get?
Only the parts every dialect agrees on: hash headings, paragraphs separated by blank lines, hyphen bullets and horizontal rules. Nothing here depends on a GitHub or CommonMark extension, so it renders the same wherever you paste it.
Why are there lines of dashes through my document?
Those are page breaks. Each one is a horizontal rule marking where one PDF page ended and the next began, so a thirteen-page document comes back with twelve of them.
A heading came out at the wrong level. Why?
Levels are ranked by type size, because a PDF stores sizes and not headings. Where a document uses size for emphasis rather than hierarchy — a pull quote, a large first line — the ranking follows the size and gets the level wrong.
Do tables survive?
No. A table in a PDF is text positioned to look like a grid, and this conversion reads it as lines. If the tables are the reason you are converting, PDF to Excel infers the rows and columns from that geometry instead.
Does it work on scanned PDFs?
Yes. When there is no text layer, an AI recognition model runs in your browser and reads the characters off the page images. Headings are then ranked by measured line height rather than font size, and nothing is uploaded.