Tool King

Search tools...

Search for a command to run...

How to convert PDF to Markdown

PDF is a presentation format, not a source format — once a document becomes a PDF, there's no Markdown, Word, or HTML underneath it anymore, just positioned text and glyphs on a page. Converting it back to Markdown is genuinely harder than the other direction, but it's exactly what you need when you want to edit, diff in git, or republish content that now only exists as a PDF.

Tool King's PDF to Markdown tool extracts the text layer of the PDF and reconstructs it line by line. To avoid handing back one undifferentiated wall of text, it also looks at each line's font size relative to the rest of the document — lines that are noticeably larger than the body text are treated as headings (`#` or `##`), which is usually a good proxy for how the original document was structured.

This is a heuristic, not a true structural read, so it's worth setting expectations: it works well for reports, articles and text-heavy documents with a normal heading hierarchy. It won't reconstruct multi-column layouts or tables (those come back as plain lines of text), and it can't extract anything from a scanned, image-only PDF, since there's no text layer to read in the first place.

For a fast way to get a PDF's content into something you can edit in a text editor or commit to a repository, though, it beats retyping the whole thing by hand.

Try this tool

PDF to Markdown