PDF to Markdown converter

Convert a PDF to clean Markdown: headings from font sizes, bold and italic from the fonts, links, numbered and bulleted lists, code blocks, with repeated page headers and footers removed. Ready to paste into a README, a wiki, Obsidian or an LLM prompt. Free, and your PDF never leaves your browser.

No PDF yet. You can also drop a file on this box.

How the conversion works

A PDF has no headings or paragraphs, only pieces of text drawn at x/y positions in a given font. This page reads them with pdf.js (the PDF engine in Firefox) and rebuilds the structure:

MarkdownHow it is detected
HeadingsLines set larger than the body text. The most common size is the body; bigger sizes become #, ##, ### from largest down.
A short bold line on its own becomes the next level down. Rotated text and labels that repeat in figures stay plain text.
Bold, italic, codeFrom the font name (Arial-BoldMT, Times-Italic, Courier...). Two or more lines in a monospaced font become a fenced code block.
LinksThe PDF's link areas, matched to the words under them.
ListsLines that start with •, –, 1., a) or (i), nested by indent.
Bullets that are drawn as shapes, not characters (common in PDFs printed from browsers), can't be seen, so those items come out as paragraphs.
ParagraphsLines are joined until a bigger vertical gap, and words split with a hyphen at a line end are put back together.
Headers, footersLines at the top or bottom of a page that repeat on at least half the pages (with page numbers ignored), and bare page numbers.

We tested it on three real files: the "Attention Is All You Need" paper from arXiv (title, Abstract and every numbered section and subsection came out as headings at the right level), a Wikipedia article printed to PDF by Chrome (headings, bold, italic, inline code and links), and the IRS Form W-9 (headings, bold labels, italic references).

What it can't do

ContentWhat you get
TablesCell text in reading order, one cell or row per line, not a Markdown table.
For tables, use PDF to Excel or PDF to CSV.
Images and chartsDropped. Use extract images from PDF to save them.
MathThe symbols as text, not LaTeX.
Scanned PDFsNothing, because the pages are pictures.
Run OCR PDF first, then convert the result here.
Two-column layoutsColumns come out in the order the PDF draws them, which is column by column for most files.

PDF to Markdown API

For PDFs that are online, or many of them, use the Shotmint API. Pass the PDF's URL to /v1/content and you get JSON back with the Markdown (built with the same heading, bold and link rules as this page), the title, the word count and the page count:

curl "https://shotmint.creasework.com/v1/content?url=https://arxiv.org/pdf/1706.03762" -H "X-API-Key: YOUR_KEY"

On that 15-page paper it took 2 to 3 seconds in our tests and returned "Attention Is All You Need" with 5,976 words (about 40,000 characters of Markdown). The response has content_type: "application/pdf", pages and pages_read. Files can be up to 30 MB, and the first 300 pages are read. Add format=text for plain text, or max_chars=50000 to cut long files down for a prompt. Scanned PDFs have no text layer, so they come back empty, with a note that points to OCR PDF.

The same call works on web pages. It loads the page in Chromium (JavaScript included), keeps the main content and returns Markdown with the title and links, which is what an LLM or a RAG pipeline wants:

curl "https://shotmint.creasework.com/v1/content?url=https://en.wikipedia.org/wiki/Markdown" -H "X-API-Key: YOUR_KEY"

Each call is 1 credit, PDF or page. €5 buys 2,000 with no subscription, and credits never expire. Try it without a key on website to Markdown, or read the guide to web pages to Markdown for LLMs and RAG.

Get 25 free calls a month API docs

FAQ

Is my PDF uploaded? No. The conversion runs in JavaScript on this page, so the file stays on your device.

Why are some headings at the wrong level? Levels come from font sizes. A PDF that uses the same size for its title and its sections can't be told apart. Set Headings to "None" for plain paragraphs, or fix the few # marks by hand.

Is the output good for ChatGPT, Claude or a RAG index? Yes. Markdown keeps the headings, so you can split long documents by section, and removing repeated headers/footers (on by default) keeps page headers and page numbers out of every chunk.

Can it read password-protected PDFs? Yes, if you know the password. The page asks for it, and the password stays in your browser too.

Is there a PDF to Markdown API? Yes. GET /v1/content?url= with a PDF link returns its Markdown as JSON for 1 credit, and a free key gives 25 calls a month. See "PDF to Markdown API" above.

Is there a size limit? No limit and no signup. Very large PDFs depend on your device's memory, so use a page range if your browser struggles.

Related: PDF to text, OCR PDF, HTML to Markdown, Google Docs to Markdown, website to Markdown, Markdown to PDF, compare two PDFs, extract images from PDF, split PDF, merge PDF.

Related tools

Markdown to PDF · Google Docs to Markdown · Markdown table generator · CSV to Markdown table · HTML to Markdown · Markdown to Word · Markdown to HTML · Website to Markdown · DOCX to Markdown · Excel to Markdown Table · Markdown Table to CSV Converter · Markdown to DOCX · Markdown Viewer · Online Markdown Editor with Live Preview · URL to Markdown · Word to Markdown Converter · PDF to text · PDF to Word · BMP to PDF · Extract Pages from PDF · GIF to PDF · HEIC to PDF · PDF Metadata Editor · Webpage to PDF · XLSX to PDF Converter · all free tools