PDF to Markdown

Published Updated

Convert PDF to Markdown with headings, lists and tables detected — free and processed entirely in your browser.

About PDF to Markdown

This PDF to Markdown converter turns the text of a PDF into Markdown that keeps the structure of the document: headings, bullet and numbered lists, paragraphs, bold and italic text, code and simple tables. Drop in a report, a research paper, a manual or an article, press Convert, and you get text you can paste into a notes app, a documentation repository or a conversation with an AI assistant, where headings and lists help the reader follow the document. The PDF is processed in your browser; this page does not upload it, and no account is needed.

The tool reads the text stored in the PDF together with its fonts. The font size that carries most of the text is treated as the body, and clearly larger or fully bold lines become headings, with the largest size as the top level. Bullets, numbers and indents become lists, line spacing and first-line indents separate paragraphs, and words split by a hyphen at the end of a line are joined again. Rows that split into columns are rebuilt as Markdown tables using the same row and column detection as our PDF to Excel tool, and pages set in two columns are read left column first. Repeated headers, footers and page numbers can be removed, and a preview shows the result before you copy it or download the .md file.

Know what a text-based conversion cannot do. A scanned PDF is only a picture of a page, so there is no text to read, and this tool has no OCR; it tells you so instead of producing an empty file. Images, charts and formulas drawn as graphics are not included, and unusual layouts such as a table inside a table may need a quick tidy-up. If you only need the words without any formatting, use our PDF to Text tool, or choose PDF to Word when you want an editable document.

What each part of a generated PDF became

A four-page US Letter PDF, made with pdf-lib in the standard Helvetica, Helvetica-Bold, Helvetica-Oblique and Courier fonts, was measured with the real tool in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app), default options. All three gave the same 3,961-byte features.md, typed text/markdown with charset UTF-8, the card "3 of 4 pages read · 692 words · 5 headings · 7 list items · 1 table · 3.9 KB" and two warnings: page 4 has no selectable text and was skipped, and 1 page was read as two columns.

In the PDFIn the Markdown
Bold titles at 24, 18 and 14 pt over 11 pt body text# Field Guide to Rivers, ## Upstream Notes, ### Small Streams
Three body lines with no extra gapone paragraph, the lines joined with spaces
"inter-" and "self-" at line ends, with "national" and "contained" belowinternational and selfcontained: a compound's own hyphen is removed too
A line with a bold run and an italic runA line with **bold words** and *italic words* in the middle.
Three • bullets, and a – item indented 18 pt under the second- Gravel bars move after each flood. and so on, with - Trout use them as refuges. indented by four spaces
Lines starting 1., 2., 3.1. Measure the width., 2. Time a floating stick., 3. Multiply by the depth.
Café, Zürich, São Paulo, Ærø, naïve, 25 € and curly quotesthe same characters, in UTF-8
The text Maps: example.org/rivers with a link on itMaps: example.org/rivers: the visible text only, not the address the link points to
Three lines in Couriera fenced block: ```, the three lines with their indentation, ```
A 3-column, 4-row table with a bold header and numbers aligned rightthe lines "| River | Length (km) | Mouth |" and "| --- | ---: | --- |", then "| Rhine | 1,233 | North Sea |" and two more rows
Page 2: a full-width title over two columns of 24 lines each## Meanders and Channels, then the left column as one paragraph, then the right column
The header Field Guide - Draft and a page number in the margins of pages 1 to 3removed
5 * 3, snake_case_name, _lead, <tag>, back\slash, [see](x) and `tick` in body text5 \* 3, snake_case_name, \_lead, \<tag>, back\\slash, [see\](x) and \`tick\`: escaped so they stay text
A paragraph that starts with "# 5 is not a heading"\# 5 is not a heading here, ...
Page 4: a picture of text-like bars, no textskipped, with the warning above

The headings, lists and code fence are CommonMark syntax: an ATX heading opens with 1 to 6 # characters, and a fence is at least three backticks. Pipe tables come from the tables extension of GitHub Flavored Markdown, where a colon at the right end of a delimiter cell, as in ---:, marks a right-aligned column.

Options, messages and conversion time

The same PDF with one option changed from its default:

OptionWhat changed in the Markdown
Remove headers, footers and page numbers: offField Guide - Draft appears three times, and the page numbers 1, 2 and 3 become lines of their own (4,033 bytes, 707 words)
Detect tables: offthe table turns into one paragraph: **River Length (km) Mouth** Rhine 1,233 North Sea Danube 2,850 Black Sea Loire 1,006 Atlantic
Join words split at line ends: offinter- national and self- contained, with a space
Mark page breaks: on<!-- Page 1 --> at the top, then --- and <!-- Page 2 -->, and --- and <!-- Page 3 -->, between pages (4,022 bytes)
  • A PDF that is only a picture of a page gets "This PDF has no selectable text. It looks like a scan or a photo of a document, so there is nothing to convert." and no file.
  • A PDF that needs a password to open gets "This PDF is password-protected." and is not read.
  • The first 60% of a valid PDF, and a text file renamed .pdf, get "Couldn't read this PDF. Please make sure it's a valid PDF file and try again."
  • A .txt file is turned away at once: "That doesn't look like a PDF file. Choose a file that ends in .pdf." A file named Report.PDF with no type, or typed application/pdf with no extension, is accepted.
  • 301 pages get "This PDF has 301 pages. The limit is 300." A file of 52,428,800 bytes is accepted; one more byte gets "This PDF is 52,428,801 bytes. The limit is 52,428,800 bytes (50.00 MB)", and a 60,000,000-byte file "This PDF is 57.22 MB. The limit is 50.00 MB".
  • The download is named after the PDF: Report v2.final.pdf gives Report v2.final.md, notes.PDF gives notes.md, a:b?.pdf gives a_b_.md and a file named only .pdf gives converted.md.

Timings on generated copies of the feature page (one to 100 pages), from the click until the download link appeared, median of 5 runs. Convert again after an option change reuses the text already read:

PDFChrome 157Firefox 155the WebKit build
1 page, 3,965 bytes (1,091 bytes of Markdown)53 ms; again 7 ms115 ms; again 7 ms70 ms; again 5 ms
20 pages, 62,223 bytes (21,419 bytes)81 ms; again 7 ms195 ms; again 19 ms114 ms; again 10 ms
100 pages, 308,100 bytes (107,099 bytes)155 ms; again 20 ms640 ms; again 50 ms240 ms; again 23 ms

How to Convert PDF to Markdown

  1. Step 1

    Upload your PDF

    Drag and drop a PDF that contains selectable text, such as a report, paper, manual or article, or choose it from your device.

  2. Step 2

    Choose options and convert

    Decide whether to drop repeated headers and page numbers, detect tables and join split words, then convert. A preview shows the headings, lists and tables that were found.

  3. Step 3

    Copy or download the Markdown

    Copy the Markdown to paste into your notes, a repository or a chat with an AI assistant, or download it as a .md file.

Frequently Asked Questions

Is my PDF uploaded anywhere?

It is processed in your browser; this page does not upload it. There is no account and no watermark.

Can it convert a scanned PDF?

No. A scan is a picture of a page with no text inside it, and reading pictures needs OCR (optical character recognition), which this tool does not include. If your PDF has no selectable text, the tool says so plainly instead of returning an empty file. Run the scan through an OCR tool first, or use a PDF exported straight from Word, Google Docs or LaTeX.

How does it decide what is a heading, a list or a table?

It reads the font of every piece of text. The size that carries most of the text is the body; clearly larger or fully bold lines become headings, and the largest size becomes the top level. Bullets and numbers at the start of a line become lists, line spacing and indents separate paragraphs, and rows whose text splits into columns become tables. It is a good first draft, not a guarantee, so skim the preview.

Does it handle two-column papers?

Yes, in the common case. When a page has two columns of text with a clear gap between them, the left column is read first and then the right one, while a title or abstract that spans both stays in place. Pages with unusual layouts, such as text wrapped around figures, can come out in a different order.

Are images, charts and formulas included?

No. Only the text stored in the PDF is converted. Pictures, charts and formulas that are drawn as graphics are left out, and a table that is only a drawn picture cannot be rebuilt. Bold and italic text and code in a monospaced font are kept.

What if the result has the wrong headings?

Try turning the options off and on: removing headers and footers, table detection and joining hyphenated words each change the output, and converting again is instant because the PDF is only read once. Documents set in a single font size, or with all text in bold, have no size cues to work with, so headings may be missing.

Does it keep the links in my PDF?

Only their text. A line reading Maps: example.org/rivers with a link on it came out as that same text in Chrome 157, Firefox 155 and the WebKit build; the address the link pointed to is not in the Markdown.

Why did a hyphenated word lose its hyphen?

With Join words split at line ends on, a hyphen at the end of a line is removed when the next line starts with a lower-case letter. inter- and national became international, but self- and contained became selfcontained. Turn the option off to get inter- national and self- contained, then fix those by hand.

What is the largest PDF it accepts?

52,428,800 bytes and 300 pages. One byte more, or a 301st page, gets a message instead of a conversion. A generated 100-page PDF converted in a median of 155 ms in Chrome 157, 640 ms in Firefox 155 and 240 ms in the WebKit build.

What does Mark page breaks add?

A comment for each page: <!-- Page 1 --> at the top, then a --- rule and <!-- Page 2 --> before the second page, and so on. The rule never comes before the first page, so the file does not start with ---.

Related Tools