PDF to Markdown Converter

Drop or paste a PDF and copy Markdown. Headings, lists, tables, and links are converted in your browser.

PDF input

Try a file

Reading the PDF…

The PDF stays in this browser. Files up to 25 MB, and the first 80 pages, are not uploaded.

Markdown output

Converted Markdown shows up here.

PDF to Markdown, in short

Drop a PDF on the left, or paste the PDF file. The Markdown fills in when the file is read. Copy the text or download a .md file. Raw is the file. Preview only helps you read it. Scans, pictures, and page decoration are left out.

A PDF to Markdown converter reads the text already stored in the file and writes headings, lists, tables, and links as Markdown characters. Use the tool above. The work happens in your browser. Small Tools Buddy does not upload or store the PDF.

You need this when a report, a handout, or an export is a PDF and the next place wants a README, a docs page, or text you can paste into a chat. The box above does that one job. It does not redraw the page, and it does not read HTML.

How to convert a PDF to Markdown

Three steps. Stay on this page. Nothing is sent to a Small Tools Buddy server.

  1. Add the PDF

    Drop the file on the left, paste the PDF file with Ctrl+V (Command+V on a Mac), or upload a .pdf up to 25 MB. Pasting text you copied out of a reader does not work. The file is read on this device.

  2. Click Convert to Markdown

    A new file converts as soon as it is read. Convert to Markdown runs that pass again. Raw is the Markdown. Preview is a reading view of that text. Only the first 80 pages are converted.

  3. Copy or download the .md file

    Copy puts the Markdown on your clipboard. Download .md saves a file next to your other downloads, using the PDF name with a .md ending. This page does not keep a copy.

What the converter keeps

PDF files store words at positions. This page uses PDF.js to read those words in the browser, then guesses structure from size and alignment. The most common type size is treated as body text.

In the PDFMarkdown you get
Larger type, up to 90 characters and 16 words, with no final period#, ##, or ###
A line that starts with a bullet or with 1. or 1)A Markdown list
Two or more aligned rows, two or more columnsA pipe table. The first row is the header
A link annotation whose address is http, https, or mailto[label](url)
A monospace font, when PDF.js reports that familyA fenced code block
Wrapped lines in the same paragraphOne paragraph. A hyphen joins when the next line starts with a lowercase letter

A line becomes # when its type is at least 65% larger than the body, ## at 32%, and ### at 16%. It also has to stay within 90 characters and 16 words, and it cannot end with a period, question mark, or exclamation mark. A line that already starts with a bullet or a number stays a list, even when the type is large. Bold text at the body size stays a paragraph. It does not become a heading by itself.

A table needs two or more rows and two or more columns. A new cell starts when the gap is larger than both 22 points and 1.8 times the type size. Columns must line up within 16 points. The first row is the header, which is how GitHub pipe tables work. One row with a wide gap stays a single line, with a dot between the pieces. Merged cells are not preserved.

The sample PDF, converted

The tool opens sample.pdf until you drop your own file. That sample has a title, a short paragraph, a section heading, two bullets, a numbered list, a two-column table, and one link. This is the Markdown it produces:

Raw Markdown from sample.pdf
# Project notes

These notes are a text PDF. A heading, a list, a table, and a link should survive as Markdown.

## What to keep

- Headings stay headings
- Lists stay lists

1. Copy the Markdown
2. Read it before you share it

| Piece | Result |
| --- | --- |
| Heading | Kept |
| Link | Kept |

[Small Tools Buddy](https://smalltoolsbuddy.com/)

The title is one # because it is much larger than the body. “What to keep” is ##. The bullets and the numbers stay separate lists. “Piece” and “Result” are the header row even though they are not a larger type size. The link text is the visible words, and the address is the link stored in the PDF.

What this converter leaves out

There is no OCR. If you cannot select the words in a normal PDF reader, this page cannot select them either. An encrypted PDF stops and asks you to open it with the password first. A damaged file stops instead of inventing text. Files over 25 MB are refused. Past page 80, the rest of the document is not converted, and the page says so.

Pictures, drawings, and background art are not described. A URL written as ordinary text is not turned into a link unless the PDF also stores a link annotation. Addresses that use javascript: are dropped, and the visible words stay as text. An indented line that starts with a letter and a period, such as a., becomes a bullet, and the letter stays in the item.

On a file of three or more pages, a line of 80 characters or fewer in the top 10% of the page is removed when that same line appears on enough pages to reach 60%, rounded up. The bottom 8% follows the same rule, which is how a repeated running title is left out. A page number that changes every page stays, because the text is not the same.

Two columns are read left side first only when each side has at least four lines, the right side starts at least 48% of the way across the page, and the gap between the sides is empty. A newsletter with mixed boxes will not follow that rule. Read the Markdown if the PDF is designed as a poster rather than a document.

This page, HTML, or a local converter

Use this page for one text PDF. You have the file, you want a .md file, and you do not want to install anything. That is the fit.

Use the HTML to Markdown converter when the source is tags, not a PDF. That page reads HTML you paste or upload. It will not open this file, and this page will not read those tags.

Use Pandoc when the file is on your computer and you want a converter you run yourself. You install it and you choose the command. This page does not call Pandoc, and it does not claim to match Pandoc's result.

Read the Markdown before you share it

Raw is the text Copy and Download use. Preview renders that same text as headings, lists, and tables. It is not a picture of the PDF. This converter does not write image tags, so Preview does not request pictures from the file.

Check the # marks before you paste into a docs site or a chat. A line that was only slightly larger than the body can land on ###, and a sentence that ends with a period stays a paragraph even when the type is large. Characters that Markdown would treat as formatting are escaped in ordinary text. Text inside a code fence is not escaped that way.

After you copy, count words only if you need a count. Paste the Markdown into the word and character counter, or open the original PDF in the PDF word counter. This converter does not count words.

A text PDF belongs on this page when you want Markdown. A different file, or a count, belongs on a different tool.

What to do next

Convert the file, read Raw, then copy or download it. If the destination is a README, a docs page, or a chat box, you are done after a look at the headings, the table header, and the links. If the destination needs the printed layout, Markdown is the wrong target.

PDF to Markdown questions

How do I convert a PDF to Markdown?

Drop a .pdf on the left, paste the PDF file, or upload one up to 25 MB. The converter reads the text layer in your browser and fills the Markdown box. Copy it, or download a .md file. The first 80 pages are included.

Can I paste a PDF?

Yes, if the clipboard holds the PDF file. Click the PDF panel and paste. If you copied words out of a PDF reader, that paste is text, and this page asks you to drop the file or use Upload instead.

Is my PDF uploaded?

No. Small Tools Buddy does not receive the PDF, the text, or the Markdown. Closing the tab clears it. A browser extension on your computer can still see the page, so do not convert a file that contains passwords or private keys.

Will headings, tables, lists, and links stay?

When the PDF has a real text layer, larger type can become headings, aligned rows can become a pipe table, bullets and numbered lines can become lists, and link annotations can become Markdown links. Pictures, scans, and layout columns are not rebuilt. Read Raw before you share the file.

What happens with a scanned PDF?

A scan is a picture of text. This page does not run OCR, so a file with no selectable text produces no Markdown. Run OCR in another tool, export a text PDF, then convert that file here.

Why does the Markdown not look like the PDF page?

Markdown stores structure, not the page. Margins, colors, text boxes, and exact column positions are not in the result. A heading is inferred from type size. A table is inferred from gaps. If the PDF was only meant to be printed, check the Markdown before you publish it.

How is this different from the HTML to Markdown converter?

This page opens a PDF. The HTML to Markdown converter reads tags you paste or upload as .html, .htm, or .txt. It does not open a PDF. Use the PDF word counter when you only need a count, not a .md file.

Can I download a .md file?

Yes. Download .md saves the Raw Markdown on your device. The file name is the PDF name with .md instead of .pdf. Copy does the same text without saving a file.

Is the PDF to Markdown converter free?

Yes. It is free and it does not ask for an account.