Skip to content

PDF to Markdown

New

Clean Markdown from PDF content.

Runs in your browserTakes PDF; makes MD.
Runs in your browser — your file never leaves your device.

About this tool

Convert a PDF's selectable text into clean Markdown locally, keeping paragraphs and obvious list lines. Scanned pages need OCR first.

This tool processes files entirely on your device. Nothing is uploaded to a server.

More details

PDF to Markdown writes the text layer of one PDF out as a .md file. The file name, minus its extension, becomes the # title, and in a multi-page PDF each page that yields text gets its own "## Page" heading with its original page number. Within a page, lines that wrap are joined back into sentences, a word hyphenated at a line end is rejoined, and list lines, whether they start with -, *, +, a number or a bullet character such as •, stay on lines of their own as Markdown list items.

Paragraph breaks are worked out from where the lines sit on the page: a new paragraph starts where the gap between two lines is more than 1.3 times the spacing between the wrapped lines of a paragraph, where a line is indented like the first line of a paragraph, or where the text moves back up the page to a new column without a sentence running on across it. A page with no wrapped line gives no spacing to measure and can arrive as one paragraph, and a page that mixes line spacings may split more often than it should, so check the breaks before you publish.

The Markdown is built on your own device, in this browser tab, and the PDF is not uploaded to pdf.xyz; each run takes a single file of at most 100 MB. A short line set at least 20% larger than the body text becomes a Markdown heading, larger sizes ranking higher. Font weight and style are not read, so nothing becomes bold or italic; table cells run together as plain text; images and the web addresses behind links are dropped. A page with no text layer, such as a scan, adds nothing, and a PDF where no page yields text gets a "No selectable text found" result instead of an empty file.

When to use it

  • Moving a report into a notes app or wiki

    Get an exported report into a Markdown notes app, a wiki or a README without deleting every hard line break by hand; check the paragraph breaks and headings it found before you publish.

  • Giving a document to a chat assistant

    Paste the Markdown into an AI chat so the assistant reads text rather than a file; in a multi-page PDF the ## Page headings let you point it at a page by number.

  • Finding out whether a PDF has text at all

    A "No selectable text found" result means no page gave up any stored text, so search and copy in a PDF viewer usually find nothing either; the file needs OCR before its words can be read.

What this tool can do

Structure
The file name becomes the # title, a PDF with more than one page gets a ## Page N heading before each page's text, and short lines set at least 20% larger than the body text become headings.
Paragraphs and lists
Lines that wrap are joined into paragraphs, split where the page leaves a wider gap or indents a line; a line that starts with a list marker (-, *, +, •, ▪ or a number) stays a list item.
Not rebuilt
Tables, images and text styling are not recreated — table rows come through as plain text. For tables, use Extract Tables.

How it works

  1. 1Pick the PDF

    Hand over a single PDF through the "Drop your PDF here, or browse" panel, either by dropping the file on it or by clicking it and choosing from your device. A file over 100 MB, an empty file, a file that is not a PDF or cannot be read as one, and a PDF that needs a password to open are each refused with a message; otherwise the file's name, page count and size appear.

  2. 2Press Create Markdown

    There is nothing to set first. The button reads "Creating Markdown…" while every page's text is read and rearranged on your device.

  3. 3Read the result

    Under the heading "Markdown created", a summary line gives the number of Markdown characters and the PDF's page count, with the Markdown itself below in a box you can scroll and select from.

  4. 4Download MD

    Download MD saves a UTF-8 .md file named after your PDF with "-markdown" added, so report.pdf becomes report-markdown.md. "Start over" brings back the empty drop box for the next document.

Common questions

Why does it say "No selectable text found"?

No page gave up a stored character other than white space, which is typical of a scan, a phone photo, or a file whose lettering was turned into drawn outlines. OCR PDF can add a text layer: leave its Output on "Searchable PDF" and select every language printed on the pages, then convert the PDF it returns here. OCR PDF runs on pdf.xyz's secure server, so unlike this tool it uploads your file.

Does it keep headings, tables, bold text and links?

Headings, partly. Besides the # title made from the file name and, in a multi-page PDF, the ## Page headings, short lines set at least 20% larger than the body text become Markdown headings, the larger sizes ranked higher. A heading set less than 20% larger, longer than 80 characters, or ending in a full stop, comma or semicolon stays ordinary text. The table grid, bold and italic, link targets and images are lost; table cells come through as words.

Which bullet styles become Markdown lists?

A line becomes a list item when it opens with -, * or + and a space, with digits followed by "." or ")" and a space, or with a bullet character such as •, ▪, ● or ◦, including the Symbol and Wingdings bullets some PDFs store in place of •. Every unordered marker becomes "- " and numbers are kept. The rule reads characters, not layout. Bullets drawn as small shapes rather than stored as characters leave nothing to read, so those lines can run into the paragraph, while a line such as "2023. Revenue grew" is split out as if it were numbered.

Is the wording changed during conversion?

Words are not rewritten, and they come out in reading order where the order the PDF stores them in is out of step with the page: a title or heading stored after the text under it, a running header stored last, and a footer or page number stored first are each moved to where they read, while a page stored a column at a time comes out a column at a time. Runs of spaces shrink to one. A word hyphenated at a line end is rejoined, so "exam-" and "ple" become "example"; a compound broken at its own hyphen, like "well-" and "known", loses the hyphen too, while one followed by a capital or a digit keeps it, as in "Jean-Paul". A paragraph that would otherwise read as Markdown syntax (one to six # signs and a space, a rule such as --- or ***, a code fence, a > quote or a | table row) gets a backslash so a Markdown viewer shows it as typed, and a < or & that would open an HTML tag or entity is escaped; other asterisks, underscores and backticks pass through and may be formatted by a Markdown viewer.

How is this different from PDF to Text?

Both read the text with the same in-browser extraction. PDF to Text writes a .txt file that keeps the PDF's line breaks and adds no markers; PDF to Markdown joins those lines into paragraphs, turns larger type into headings, splits out list lines and adds the title and page headings.

Will it open a PDF that has a password or copy restrictions?

Copy or printing restrictions are no obstacle: a PDF that opens without a password is converted like any other file. One that needs a password to open is refused as it opens, with a message saying it is password-protected; Unlock PDF can remove that password if you enter it, but that tool uploads the PDF to pdf.xyz's secure server.

Does PDF to Markdown work offline?

Not fully. The page and its processing engine load over the network, and parts of the engine are fetched the first time a step needs them. The processing itself runs on your device. Chinese, Japanese or Korean text whose font is not embedded in the PDF needs a character map, downloaded from our site the first time it is needed, and that step needs a connection.

How large can my file be?

Up to 100 MB per file.

Does PDF to Markdown keep headings, bold text and tables?

Partly. A PDF stores text as positioned lines, not as headings or tables, so the converter infers structure from size and position. The file's name becomes the title, each page gets a "Page N" heading when there is more than one, short lines set at least 20% larger than the body text become headings, lines are joined into paragraphs, and lines that begin with a bullet (-, *, + or a character such as •) or a number stay list items. Bold, italics, links and table layout are not carried over — table rows come through as plain text — and images are not exported. For tables, Extract Tables detects them by their layout and exports CSV and Excel files.

Does PDF to Markdown work on a scanned PDF?

Not on its own. PDF to Markdown reads the text a PDF already contains, and a scanned page is a picture with no text inside it, so there is nothing to read. Run the scan through OCR PDF first, then use the result here.

No sign-up required. Your files stay on your device until you run a tool.