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
- Drag your PDF file into the upload box or click Select PDF File(s) to parse all text streams locally in your browser.
- Check the live Document Telemetry bar in the sidebar for total words, characters, lines, and estimated reading time.
- 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.
- 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]andtransform[5]) of every text token viaPDF.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 (
.txtwith optional--- Page N ---dividers), GitHub-flavored Markdown (.mdwith document title H1, telemetry metadata block, and## Page Nsection headers), or structured JSON (.jsoncontaining filename, page count, total words, and apages[]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
lithiuminto 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.mdfile weighs 106 KB - a 97% smaller plain-text representation organized under## Page 1through## Page 48headings 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 inpagescontains{ "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 viaPDF.js, groups text runs that share the same verticalYbaseline into coherent horizontal lines, and inserts line breaks whenever theYcoordinate 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.txtfile 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.