Skip to content
PickZeal
    PDF tools

    PDF to Markdown Converter

    Convert PDF to Markdown online free. Keeps headings, lists, tables, links and code, drops page headers and footers, and counts LLM tokens. Nothing is uploaded.

    • Runs in your browser
    • Nothing is uploaded
    • Free, no sign-up

    This free PDF to Markdown converter turns a PDF into clean Markdown in your browser. It rebuilds headings, paragraphs, bulleted and numbered lists, tables, code blocks and links from the PDF's layout, removes repeated page headers, footers and page numbers, and shows the word and token count. Copy the result or download a .md file. Nothing is uploaded.

    How do I convert a PDF to Markdown?

    1. Drop your PDF onto the box above, or click it to choose a file.
    2. Wait a moment while every page is read. Long PDFs show their progress.
    3. Check the result in the Markdown tab, or switch to Preview to see it formatted.
    4. Press Copy Markdown, or Download .md to save a file named after your PDF.

    To convert part of the document, type a page range such as 3-10. Untick Remove page headers, footers and page numbers if you need them kept.

    How to convert PDF to Markdown for LLMs

    Pasting raw text from a PDF into ChatGPT, Claude or Gemini loses the structure: headings look like ordinary sentences, table cells run together, and every page repeats the same header and page number. Markdown keeps that structure in plain text that language models read well, which is why tools such as Microsoft's MarkItDown were built to feed documents to LLMs.

    The converter shows how many tokens the Markdown uses, counted with o200k_base, the tokenizer of GPT-4o and newer OpenAI models. Other models count a little differently, but the number tells you whether a document fits in a context window. For exact counts per model, paste the Markdown into the AI Token Counter. Removing headers and footers and converting only the pages you need are the easiest ways to cut the count.

    What does the converter keep from the PDF?

    A PDF does not store "this is a heading" or "this is a table". It stores characters at positions on a page, in a font and size. The converter reads those with pdf.js and works out the structure from the layout:

    In the PDFHow it is detectedIn the Markdown
    HeadingsText larger than the body, or short bold lines# to #### headings
    ParagraphsLine spacing, indents and short last linesJoined lines, with words split by a hyphen at a line end rejoined
    ListsBullet and number markers such as •, -, 1. and a)- and 1. items, nested by indent
    TablesText in two or more aligned columnsMarkdown pipe tables
    CodeMonospace fontsFenced code blocks with indentation kept
    Bold, italic and linksFont names and the PDF's link areas**bold**, *italic* and [text](url)
    Table of contentsDot leaders before a page numberA list of entries with page numbers
    Page headers, footers and numbersText repeated at the top or bottom of pagesRemoved (you can keep them)
    Images and chartsPictures, not textLeft out

    The output follows GitHub Flavored Markdown, so the tables and lists display correctly on GitHub, in Obsidian and Notion, and in most Markdown editors.

    Why is the Markdown empty or out of order?

    • Empty result: the PDF is a scan or a picture of text. Run OCR (text recognition) on it first.
    • Lists without bullets: some PDFs draw bullets as small shapes instead of characters, so there is no marker to find. The items still come out as separate lines.
    • Mixed-up columns: text is converted in the order the PDF stores it. Most two-column papers store one column after the other, but a few interleave them line by line.
    • Strange characters: some PDFs use fonts without a proper character map, so even copy and paste from a PDF reader gives garbled text. The converter cannot recover those characters.

    PDF to Markdown with Python

    For batch jobs, two open-source Python libraries do the same conversion. MarkItDown from Microsoft converts PDFs, Word and PowerPoint files and more:

    pip install 'markitdown[all]'
    markitdown report.pdf -o report.md

    PyMuPDF4LLM is built for LLM and RAG pipelines:

    import pymupdf4llm
    md = pymupdf4llm.to_markdown("report.pdf")

    Both need Python installed. For a single file, the converter on this page gives the result without any setup.

    Your PDF stays private

    The PDF is read and converted on your own device. Nothing is uploaded, so confidential documents are safe. Need the reverse? The Markdown to PDF Converter turns Markdown back into a PDF. To count the words in a PDF, use the PDF Word Counter, and to save its pictures, use Extract Images from PDF.

    Frequently asked questions

    How do I convert a PDF to Markdown for free?

    Drop the PDF onto the box above or click it to choose one. The Markdown appears in a few seconds, with headings, lists, tables and links kept. Copy it or download it as a .md file. There is no sign-up, page limit or watermark.

    Is this a good way to give a PDF to ChatGPT, Claude or another LLM?

    Yes. Markdown keeps the structure a model needs, such as which lines are headings and which text belongs to a table, without the layout noise of raw PDF text. The converter also drops repeated page headers, footers and page numbers, and shows the token count so you know whether the text fits in a context window.

    Why is the Markdown empty for my PDF?

    The PDF is almost certainly a scan or a photo of pages. It holds pictures of text rather than text, so there is nothing to convert. Run it through OCR (text recognition) first, for example in Acrobat or another PDF app, then convert the new file.

    Does it convert tables to Markdown tables?

    Yes, when the PDF has real text laid out in aligned columns, which covers most tables made in Word, Google Docs, Excel and LaTeX. Each row becomes a row of a Markdown pipe table and the first row is used as the header. Tables with merged cells or cells that wrap onto many lines may need a quick tidy-up.

    Are images included?

    No. Markdown stores images as links to separate files, so pictures and charts are left out and only the text is converted. To save the images, use the Extract Images from PDF tool.

    Can I convert a password-protected PDF?

    Yes, if you know the password. The tool asks for it, and the PDF is unlocked in your browser only for the conversion.

    Can I convert only some pages?

    Yes. Type a range in "Pages to convert", for example 3-10 or 1, 4-6. The Markdown updates instantly, without reading the PDF again.

    Is my PDF uploaded?

    No. The PDF is read with pdf.js, Mozilla's open-source PDF engine, running in your browser. The file never leaves your device, so it is safe for contracts, reports and research papers.

    More PDF tools

    View all tools