Blog

How to convert a PDF to Markdown on a Mac, offline

· 6 min read

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:

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

  1. 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.
  2. Pick the Convert tab and choose Markdown.
  3. Leave Pages on All, or type just the ones you want, like 1-3, 7.
  4. Turn on Read scanned pages for a scan, and Include pictures if you want the images.
  5. 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 PDFIn the Markdown
Larger typeHeadings (#, ## …), worked out from the sizes used in the document
Bold and italic**bold** and *italic*, from the fonts
Bullet and numbered listsReal Markdown lists
Paragraphs split across linesJoined back together, with words broken by a hyphen at the line end mended
TablesMarkdown tables, with the first row as the heading row
Two or more columnsRead one column after the other
PicturesSaved in a folder next to the file and linked where they appear
Scanned pagesRead with the Mac's built-in text recognition, offline
Running heads and page numbersDropped

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

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 lineOnline toolsSqueeze
Headings and emphasisMostly lostVariesKept
TablesFix by handVariesMarkdown tables
Scanned PDFsNeeds a separate OCR stepOften paidYes, on your Mac
Uploads your PDFNoYesNo
CostFreeFree 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.