There are three ways to extract text from a PDF in 2026, depending on whether your PDF is text-based or scanned. Here’s how to tell which yours is and what to do.
Quick answer
For text-based PDFs, use our PDF to Markdown tool — runs in your browser, output is clean Markdown.
For scanned PDFs, use Image to Text (OCR) — converts PDF pages to images, then runs OCR on each.
Both are free, no signup, file never leaves your device.
How to tell which kind of PDF you have
Text-based PDF (created from Word, Google Docs, or saved from a webpage):
- You can select text with your cursor
- File size is small (under 1 MB for 10 pages)
- Searching works
Scanned PDF (created from a scanner or image):
- Text looks like a photo
- You can’t select text
- File size is large
- Searching doesn’t work
If you can select text in your PDF, use Method 1. If not, use Method 2.
Method 1: Text-based PDFs (90% of cases)
Use our PDF to Markdown tool:
- Open pullsy.online/tools/pdf-to-markdown/
- Upload your PDF (drag-drop or click to browse)
- Click Convert
- Copy the Markdown output OR download as .md file
Total time: 5-30 seconds depending on file size.
What you get: clean Markdown with headers, lists, and code blocks preserved. Formatted tables work but might need manual cleanup. Images are NOT extracted (we have separate tools for that).
Method 2: Scanned PDFs (10% of cases)
For scanned PDFs, two-step process:
- Convert PDF pages to images (use any free tool — even Preview on Mac or Adobe’s free online tool)
- Run Image to Text (OCR) on each page image
Or, alternatively, use Adobe’s free OCR online tool if you don’t mind uploading to their server. Adobe’s tool is better for handwritten text and complex layouts but uploads your file.
For most scanned PDFs, our OCR tool works fine because:
- It uses Tesseract.js (industry standard)
- Your images never leave your browser
- It handles multiple languages
Method 3: Command-line tools (developers)
If you’re technical, use pdftotext (part of poppler-utils):
# Install on Mac
brew install poppler
# Install on Ubuntu/Debian
sudo apt install poppler-utils
# Extract text
pdftotext input.pdf output.txt
# Preserve layout
pdftotext -layout input.pdf output.txt
For scanned PDFs via command line, use ocrmypdf:
pip install ocrmypdf
ocrmypdf input.pdf output.pdf
The ocrmypdf command adds an OCR text layer to the scanned PDF, making it searchable and selectable.
Common pitfalls
”The output is gibberish”
Your PDF is probably scanned. Switch to Method 2.
”Tables are broken”
Markdown tables work but complex merged cells don’t survive. For tables-heavy PDFs, open the original in Word/LibreOffice and copy from there.
”Some characters are wrong”
Auto-OCR has ~95-98% accuracy. For technical terms, names, or non-English text, you’ll need to manually correct.
”Images are missing”
Markdown doesn’t preserve images by default. For image extraction, use a separate tool (Adobe Acrobat free trial or pdfimages command-line).
”The PDF is password-protected”
Decrypt it first. On Mac: open in Preview → File → Export as PDF (saves without password). On Windows: open in Adobe Reader → File → Properties → Security → Remove.
When each method is best
| PDF type | Best method |
|---|---|
| Modern text-based PDF | PDF to Markdown |
| Scanned PDF, clean text | Image to Text OCR |
| Scanned PDF, handwriting | Adobe OCR or professional service |
| Large batch (100+ PDFs) | Command-line pdftotext |
| Tables-heavy PDF | Open in Word, copy from there |
| Form fields | Adobe Acrobat |
Privacy
Both our PDF to Markdown and OCR tool process your file entirely in your browser. The file never leaves your device. This is important for sensitive documents — tax returns, medical records, legal documents, etc.
Most other free PDF tools upload your file to a server. That’s fine for non-sensitive stuff, but for confidential documents, browser-only tools are the safest option.
Related guides
- Need to compress the PDF? See our PDF Compressor.
- Need to convert scanned PDFs specifically? See our OCR tool.
- Need broader PDF tool coverage? See our best free PDF tools.