How to convert a PDF to Markdown on a Mac, offline
The short answer
macOS can't do it on its own. Your options are command-line tools, online converters, or a Mac app. Squeeze converts a PDF to Markdown on your Mac in one step, keeping headings, bold and italic, lists and tables, saving the pictures in a folder next to the file, and reading scanned pages with the Mac's own text recognition.
Why Markdown?
Markdown is plain text with a few marks for structure: # for a heading, ** for bold, - for a list. That makes it the format of choice for:
- Notes apps like Obsidian, Bear, Logseq and Notion, which import it directly.
- AI chats. Paste Markdown into ChatGPT, Claude or Gemini and the model sees the real headings and tables, not a jumble of lines.
- Docs and websites: GitHub, wikis and most static site tools are written in it.
Why copy and paste isn't enough
A PDF doesn't know what a heading or a table is. It only records where each word is drawn on the page. Copy the text out of Preview and you lose every heading, two columns get read straight across as if they were one line, tables collapse into a run of words, and the page numbers and running heads land in the middle of your paragraphs.
A good converter has to rebuild the structure from the layout: bigger type is a heading, a bold font is bold, things that line up in columns are a table, and a line that ends with a hyphen continues on the next one.
1. The command line (free)
If you're comfortable in Terminal, pdftotext (part of poppler, installed with Homebrew) pulls the text out of a PDF for free, and you can script it for a whole folder. What you get is plain lines: no headings, no bold or italic, and tables flattened into spaced-out text that you tidy into Markdown by hand.
2. Online converters
Upload the PDF, download a .md file. Some do a decent job with structure. But the PDF goes to their server, which matters for exactly the kind of documents people feed into notes and AI chats: contracts, research, internal reports, medical letters. And a scanned PDF often needs a paid plan for the text recognition.
3. Squeeze: Markdown on your Mac
- Drop the PDF onto the Squeeze icon in the menu bar, or start dragging it and give it a quick shake. Drop several to convert them together.
- Pick the Convert tab and choose Markdown.
- Leave Pages on All, or type just the ones you want, like 1-3, 7.
- Turn on Read scanned pages for a scan, and Include pictures if you want the images.
- Click Convert to Markdown.
You get a .md file named after the PDF, and, if it has pictures, a folder called [name] pictures next to it that the Markdown points to. Keep the two together when you move them into your notes. The PDF itself isn't changed, nothing is uploaded, and it works offline.
What the Markdown looks like
| In the PDF | In the Markdown |
|---|---|
| Larger type | Headings (#, ## …), worked out from the sizes used in the document |
| Bold and italic | **bold** and *italic*, from the fonts |
| Bullet and numbered lists | Real Markdown lists |
| Paragraphs split across lines | Joined back together, with words broken by a hyphen at the line end mended |
| Tables | Markdown tables, with the first row as the heading row |
| Two or more columns | Read one column after the other |
| Pictures | Saved in a folder next to the file and linked where they appear |
| Scanned pages | Read with the Mac's built-in text recognition, offline |
| Running heads and page numbers | Dropped |
Text in the PDF that merely looks like Markdown, such as a line starting with a #, is escaped, so it doesn't turn into a heading by accident.
What it can't do
- It's a careful reading of the layout, not a copy of the source. An unusual design, such as a heading set in the same size as the body text, can come out as a plain paragraph.
- Charts and diagrams drawn with lines and shapes aren't pictures, so they're not carried over. Screenshot them if you need them.
- Maths comes through as the characters on the page, not as LaTeX.
Using it with Claude
Squeeze includes a tool server for Claude Desktop and Claude Code. Once it's connected, you can ask Claude to "turn this PDF into Markdown", and Squeeze does the conversion on your Mac and saves the .md file next to the PDF. Squeeze itself sends nothing anywhere; Claude is told the file names and where the result was saved, and can then open the Markdown if it has access to your files, as Claude Code does.
The options side by side
| Command line | Online tools | Squeeze | |
|---|---|---|---|
| Headings and emphasis | Mostly lost | Varies | Kept |
| Tables | Fix by hand | Varies | Markdown tables |
| Scanned PDFs | Needs a separate OCR step | Often paid | Yes, on your Mac |
| Uploads your PDF | No | Yes | No |
| Cost | Free | Free tiers, often with limits | $15.99 once, 14-day free trial |
Questions
Can I import the result into Obsidian?
Yes. Put the .md file and its pictures folder in your vault together; the picture links are relative, so they keep working.
Does it work on scanned PDFs?
Yes. Turn on Read scanned pages. Scanned pages are read with the text recognition built into macOS, on your Mac.
Can I convert only part of a PDF?
Yes. Type the pages in the Pages box, for example 1-3, 7, or 10- for page 10 to the end.
Is Markdown better than Word for AI chats?
Usually. It's plain text, so you can paste it straight in, and the model sees the headings and tables without any formatting overhead. Word is better if a person is going to edit the document. Squeeze does both: see how to convert a PDF to Word on a Mac.
Which Macs does Squeeze run on?
Apple silicon and Intel Macs with macOS 14 or later.
Try it on your own PDFs
Squeeze also converts PDFs to Word and pictures, compresses, merges and signs them, and works with images, video and audio. The trial has every feature.
Download free trial 14 days, no card needed. $15.99 once if you keep it, with a 14-day refund.