ShiftTools ShiftTools
Zero-Upload Browser Utility

PDF to Text & Markdown

Extract selectable plain text, Markdown, or page-indexed JSON from any PDF in your browser with live word counts and keyword filtering.

Interactive Tool Workspace

Loading local in-browser WebAssembly engine & hardware cryptographic sandbox...

Highlighting and copying text directly out of a PDF viewer often mangles line breaks, glues words together across margins, or forces you to scroll through dozens of pages by hand. Drop any document here to convert PDF to text, clean Markdown (.md), or page-indexed JSON (.json) right in your browser, complete with instant word, character, and reading-time counters plus per-page copy buttons.

When extracting structured text beats manual copy-pasting

Researchers, writers, and developers frequently need to pull the prose out of a long PDF report to quote in an article, feed into a local script, or edit in a Markdown workspace. Selecting 40 pages with a mouse cursor in a browser PDF tab is slow and frequently grabs repeating running headers and page numbers alongside the paragraphs.

Switching between Combined Document View and Per-Page Cards View solves both workflows. When you want the entire document as one continuous stream - or want to filter the entire PDF down to only the lines containing a specific keyword like "indemnification" or "Q4 revenue" - Combined View gives you a live searchable buffer. When you only want to copy the text from Page 12 without touching the rest of the file, Per-Page Cards View gives every page its own dedicated Copy Page button.

And if you are building a search index, data pipeline, or RAG knowledge base, exporting directly to JSON gives you an array of page objects with page numbers, word counts, and clean strings ready to parse.

How to convert PDF to text, Markdown, or JSON

  1. Drag your PDF file into the upload box or click Select PDF File(s) to parse all text streams locally in your browser.
  2. Check the live Document Telemetry bar in the sidebar for total words, characters, lines, and estimated reading time.
  3. Toggle between Combined View (one continuous document) and Per-Page Cards, or type a term into the Filter Lines by Keyword input to isolate matching lines.
  4. Click Copy All Text, or choose your download format: Download .TXT, Download .MD (Markdown), or Download .JSON.

Coordinate-sorted extraction and multi-format export features

Inside a PDF file, text is not stored as neat paragraphs; it is stored as individual glyph runs positioned at (x, y) coordinates on a Cartesian grid. A naive extractor dumps strings in whatever order the PDF writer emitted them, which often scrambles headers and columns.

  • Positional Y/X coordinate sorting: Reads the transformation matrix (transform[4] and transform[5]) of every text token via PDF.js, groups tokens by vertical baseline within a 4-point tolerance, and sorts them left-to-right so lines reconstruct in natural reading order.
  • Three export formats (.TXT, .MD, .JSON): Export plain UTF-8 text (.txt with optional --- Page N --- dividers), GitHub-flavored Markdown (.md with document title H1, telemetry metadata block, and ## Page N section headers), or structured JSON (.json containing filename, page count, total words, and a pages[] array).
  • Live keyword line filter: Typing a query into the search box filters the Combined View in real time to show only lines matching your keyword, making it easy to extract all clauses or citations mentioning a term.
  • Instant document statistics: Calculates exact word count, character count, non-empty line count, and reading time (at 200 words per minute) as soon as the file loads.
  • Encrypted PDF support: Unlocks password-protected PDFs locally in memory so you can extract text from locked statements.

Worked example: parsing a 48-page policy report into Markdown and JSON

Suppose you load National-Energy-Outlook-2026.pdf (48 pages, 3,600 KB) into the workspace:

  • In roughly 0.7 seconds, the local parser extracts all 48 page streams and reports 16,420 words, 104,890 characters, 1,840 lines, and an estimated 83 min read.
  • You type lithium into the Filter Lines by Keyword box; the Combined View immediately narrows down to the 27 lines across the 48 pages that mention lithium.
  • You clear the filter and click Download .MD (Markdown). The resulting National-Energy-Outlook-2026.md file weighs 106 KB - a 97% smaller plain-text representation organized under ## Page 1 through ## Page 48 headings that you can open directly in Obsidian, VS Code, or our Live Markdown Editor.
  • Clicking Download .JSON saves National-Energy-Outlook-2026.json (118 KB), where each entry in pages contains { "pageNumber": 1, "wordCount": 342, "text": "..." }.

Important limitation: digital PDFs vs. scanned image PDFs

The single most important detail to understand about client-side PDF text extraction is the difference between a digital text PDF and a scanned image-only PDF.

When a PDF was exported from Word, Google Docs, LaTeX, a billing system, or a scanner that ran Optical Character Recognition (OCR), the file contains an embedded font and character stream. This tool extracts 100% of that text instantaneously.

However, if someone placed a piece of paper on a flatbed scanner and saved the raw bitmap without running OCR, the PDF contains zero character codes - only a photograph of ink on paper. When our parser encounters a page with zero selectable text tokens, it explicitly labels that sheet as (No selectable text on this page) so you know immediately that the source page is a flat image rather than an empty string bug.

Privacy and in-browser execution

All PDF parsing, coordinate sorting, word counting, and .txt/.md/.json generation run locally inside your browser tab via PDF.js. Your documents and extracted text never leave your device.

How PDF text extraction reconstructs reading lines from X, Y glyph coordinates

Unlike a .txt or .docx file, a PDF file has no concept of paragraphs or line breaks. Inside a PDF content stream, words - and sometimes individual letters - are drawn at absolute (X, Y) Cartesian coordinates on the page (e.g., BT /F1 12 Tf 72 750 Td (Invoice) Tj ET).

  • Sorting items by vertical baseline (Y) and horizontal offset (X): Our extractor reads the text content items from each page via PDF.js, groups text runs that share the same vertical Y baseline into coherent horizontal lines, and inserts line breaks whenever the Y coordinate steps down to a new row.
  • Page delimiter headers (--- Page N ---): In long contracts or research papers, knowing which page a paragraph came from is critical for citations. Preserving clear page markers lets you search (Ctrl+F) the exported .txt file and jump straight to the matching page number in the original PDF.

Related text, developer, and PDF tools

Once you export your document as Markdown or JSON, you can edit and preview the Markdown in the Live Markdown Editor, inspect or minify the JSON structure in the JSON Formatter & Tree Visualizer, or compare two versions of the extracted text in the Code & Text Diff Checker. To pull out full visual PDF pages instead, use Extract PDF Pages or PDF to Image.

Frequently Asked Questions

Why does a page in my PDF say "(No selectable text on this page)"?

That message appears when a PDF page consists solely of a scanned bitmap image without an embedded text layer (OCR). Because this tool extracts native PDF character streams rather than running optical character recognition on photographs, image-only scans will show no selectable text tokens.

What is included when I export my PDF to JSON format?

The exported .json file contains a top-level object with the source filename, total page count, total word count, total character count, and a pages array where every page has its pageNumber, wordCount, and extracted UTF-8 text string.

How does the tool keep text lines in the right reading order?

Instead of reading text objects in raw file order, the parser inspects the X and Y coordinates of every text item on the page canvas, groups items that share the same horizontal baseline, and sorts them from top to bottom and left to right.

Can I copy the text from just one specific page instead of the whole PDF?

Switch the preview stage from Combined View to Per-Page Cards at the top of the right panel. Every individual page is displayed in its own card with a dedicated Copy Page N button.

Can I extract text from a password-protected PDF file?

Yes. When you drop an encrypted PDF into the upload zone, enter its open password in the local prompt. Once decrypted in browser memory, all text, Markdown, and JSON export options work normally.

Does the word counter include all pages in the document?

Yes, the sidebar telemetry bar totals the exact word count, character count, line count, and estimated reading time (calculated at 200 words per minute) across every page in the loaded PDF.