PDF to Markdown

Turn a PDF into a Markdown export of its words, with paragraphs rebuilt and headings guessed from the shape of each line.

Secure server processingPDFWorkingNo account needed

What this tool does

PDF to Markdown runs pdftotext over your document with layout preservation switched on, then rewrites what comes out as Markdown. Blank lines in the extract decide where one paragraph ends and the next begins, and the wrapped lines inside a paragraph are joined back into a single line, so the .md reflows in an editor instead of keeping whatever line breaks the printed page happened to need. That join is indiscriminate about page boundaries: unless a break happens to land after a blank line, the last line of one page and the first line of the next are pulled into the same paragraph. Each PDF returns one file named after the source, and the result reports the character count.

Infer headings from font sizes is the only setting, and the check behind it is worth knowing. The extracted text carries no font information at all, so the decision is made on the shape of a line: a block under 80 characters that begins with a capital or a digit and contains no lowercase letter anywhere is promoted, and it is written as a level-two heading — ## — regardless of where it sits in the document. A Title Case line is therefore left alone, and an all-caps heading pressed straight against its first paragraph, with no blank line between them, is absorbed into that paragraph instead of promoted. Switch the setting off and nothing is promoted at all. One mark goes in either way, and no control governs it: where a page break in the extract begins a block of its own, a --- rule is written in front of that block, which is why a few page boundaries surface as horizontal rules and most leave no trace.

Only the words cross over. Weight, type size, colour, links, list markers and images have no representation in extracted text, so nothing in the output marks them. Tables fare worst: pdftotext holds the columns apart with runs of spaces, and then the paragraph join puts consecutive rows on one line, which reads as a long run of words rather than a grid. Extract Images pulls the pictures out of the same document, and PDF to Excel is the tool that attempts a grid. Characters that mean something in Markdown — a leading hash, an asterisk, an underscore — are passed through unescaped, so a rule or a bullet the original drew with punctuation can render as formatting you did not ask for.

Conversion happens on the server, never in the tab. The PDF travels there over an encrypted connection, the extraction and the rewriting happen on that machine, and the upload, the .md and the job record holding your setting are removed together once the short retention window passes. Three ceilings apply: a document over 300 pages is refused with its page count, the job is stopped if it runs past two minutes, and each file is accepted up to 200 MB. A scan is refused as well — with no text objects to read there is nothing to convert, and the message says so and names PDF OCR — while an encrypted file never reaches the extractor, because the page count is read first and that read is what fails. Clear the password with Unlock PDF before converting.

How to use it

  1. Add the PDF. One job runs per file, so several documents can go in together and each returns its own .md carrying the source filename. The 200 MB limit and the 300-page ceiling apply to each of them separately.
  2. Decide about the headings. Left on, short lines with no lowercase letters in them become ## headings. Switch it off when the document is full of capitalised labels, part numbers or legal headers you would rather keep as body text.
  3. Let the extraction run. Progress is reported while the text is pulled out and rewritten. A document with no text layer is stopped and named rather than handed back as an empty Markdown file.
  4. Review before you publish. The result carries a note that the headings were inferred. Expect to add the levels below ##, rebuild any tables by hand, and bring images in separately.

Processing & privacy

Secure server processing. This operation requires temporary server processing.

Common use cases

Moving a document into a docs repository

A specification that exists only as a PDF cannot be reviewed in a pull request. Markdown can be, and once the paragraphs are rejoined it diffs line by line.

Pasting into a wiki or a ticket

Most trackers and wikis accept Markdown directly, so the text lands with its paragraphs intact rather than as a wall of broken lines from a viewer's selection.

Quoting from a printed report

The wording is the part worth keeping. Converting first gives you editable prose to cut and rearrange without fighting the layout it was set in.

Feeding a static site generator

Hugo, Jekyll and Eleventy all read .md files. This gets the body text into that shape; the front matter and the heading hierarchy are yours to add on top.

Questions

Is my PDF uploaded?
Yes. pdftotext runs on the server, so the document is sent there over an encrypted connection, converted, and deleted along with its job record when the short retention window expires. No part of this tool runs in the browser tab.
Why were some of my headings missed?
Only a short block with no lowercase letter in it is promoted. A Title Case heading, a numbered heading with words spelled out, and a heading with no blank line separating it from its paragraph all stay as ordinary text, and no setting widens the test. Adding the # marks yourself afterwards is usually quicker than it sounds.
Do tables and images come through?
No. The extract holds text and nothing else, so a table arrives as words on a line with the rows run together, and pictures are absent entirely. Extract Images returns the images from the same PDF as separate files, and PDF to Excel is the one that tries to rebuild the cells.
Can it convert a scanned PDF?
Not by itself. A scan stores pictures of pages, so there are no characters to extract and the job stops with a message saying the file is probably scanned. The test behind that message is only whether the extract came back empty, so a scan carrying a stray text layer — a stamped page number, a header added afterwards — slips past it and returns a .md with almost nothing in it. Run PDF OCR first, then convert what it gives back.
Why does an encrypted PDF fail before any text is pulled out?
This job counts the document's pages before it extracts anything, and the count comes from qpdf, which cannot open a file that still holds its user password. Everything stops there, and the wording you get back blames a corrupted or encrypted document rather than naming a password. Unlock PDF removes it when you already know it, and the unlocked copy converts normally.
How is this different from PDF to Text?
PDF to Text runs in your browser, returns .txt, and can split the output per page. This runs on the server with a different extractor and adds the small amount of structure Markdown can carry: wrapped lines rejoined into paragraphs, and capitalised lines turned into headings.
How long a document can it take?
Up to 300 pages and 200 MB per file, and the job is stopped if the conversion passes two minutes. A longer document has to be cut down first — Split PDF does that, and each part converts on its own.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.