PDF to text · Markdown PDF to Markdown: clean structure for AI chats and docs
AI assistants and documentation tools read Markdown well: # for headings, - for lists, blank lines between paragraphs. This converter rebuilds that structure from the font sizes and list markers in your PDF, so a pasted report keeps its sections instead of arriving as one block of text. The file stays in your browser.
- Files stay on your device
- Headings from font size
- Lists and paragraphs
Convert PDF to Markdown
Choose a PDF. The text appears below as soon as it is read; change the settings to reshape it, then copy it or download a .txt or .md file.
No PDF yet. Choose or drop a PDF, or try the sample.
The password is only used in this tab to open the file. It is not stored or sent anywhere.
Markdown keeps headings and lists, which helps when you paste a document into an AI chat.
Join lines to get one line per paragraph; keep them to match the PDF line by line.
Leave empty for every page. Examples: 1-3, 5, 8-
Characters per page
Example: one page, rebuilt
A report page with a heading, a paragraph broken over two lines, a hyphenated word, a bullet list and a page number. Here is what the tool makes of it.
Quarterly report
Visits grew 18% in the third quarter, mostly from organic search and returning visitors. Mobile now accounts for 61% of all sessions.
What changed
• Search traffic doubled after the help centre was rebuilt.
• Paid campaigns were paused in August.
Next quarter we will test a shorter sign-up form and a new pricing page.
# Quarterly report
Visits grew 18% in the third quarter, mostly from organic search and returning visitors. Mobile now accounts for 61% of all sessions.
## What changed
- Search traffic doubled after the help centre was rebuilt.
- Paid campaigns were paused in August.
Next quarter we will test a shorter sign-up form and a new pricing page.
The page number is removed, “pric-” + “ing” is joined back into “pricing”, and the larger type becomes Markdown headings.
Version v1.0Updated Update history
What the extracted text contains
A PDF stores words as positioned pieces of text, not as paragraphs. The tool puts them back in reading order; here is what to expect.
Paragraphs
Lines that belong together are joined into one paragraph, and a blank line separates paragraphs. Choose “Keep the PDF line breaks” if you need the original lines, for example for poetry or addresses.
Headings and lists
Larger type is treated as a heading, and lines starting with •, – or 1. as list items. In plain text they stay as they are; in Markdown they become #, ## and - so other apps understand the structure.
Pages without text
A page with no characters is almost always a scan or a photo. It is listed under “Characters per page”. Run it through OCR software first, then extract the text.
Tables and columns
Cells come out row by row, separated by spaces. Two-column layouts usually come out column by column, but some PDFs store text in an unusual order; check the result before you rely on it.
The token count is a rough guide for AI tools: about one token per four Latin characters and one per Chinese character.
Extract text from a PDF in four steps
The defaults (plain text, joined paragraphs, page numbers removed) suit most documents.
-
1
Open the PDF
Choose it or drop it on the box. If it asks for a password, type it in the field that appears.
-
2
Pick the output
Plain text for notes, emails and editors; Markdown for wikis, documentation and AI chats.
-
3
Adjust if needed
Keep the original line breaks, add page markers, or type a range such as 2-5 to extract only some pages.
-
4
Copy or download
Copy the text to the clipboard or download it as a .txt or .md file. Check pages flagged as having no text.
From positioned text to paragraphs
pdf.js, the open-source PDF engine used in Firefox, returns each piece of text with its position and size. The tool rebuilds the reading order from those numbers.
- Pieces whose baselines are within half a character height of each other form one line; within a line they are sorted left to right
- A space is added where the gap between pieces is more than 0.15 of the font size; between two Chinese or Japanese characters no space is added
- A new paragraph starts when the line spacing grows to more than 1.4 times the usual spacing, when the font size changes by more than 15%, or at a list marker
- A word split as “infor-” / “mation” is joined when the next line starts with a lowercase letter
- Markdown headings: the size used by most characters is body text; up to three larger sizes become #, ## and ###
| Use | Choose | Why |
|---|---|---|
| Paste into an email or editor | Plain text | No symbols to clean up |
| Paste into ChatGPT, Claude or another AI chat | Markdown | Headings and lists keep the structure, using few extra tokens |
| Wiki, Notion, GitHub, documentation | Markdown | Renders as headings and lists straight away |
| Search or compare documents | Plain text, keep line breaks | Line numbers match the PDF |
A 12-page contract, two pages scanned
A contract exported from Word, with a signed page and an appendix that were scanned and added later.
| Pages | What happens | Result |
|---|---|---|
| 1–10 | Text read and joined into paragraphs | About 2,000 to 3,000 characters per page |
| 11 (signed page) | Image only, no text layer | Flagged: no text (scanned image?) |
| 12 (appendix) | Image only, no text layer | Flagged: no text (scanned image?) |
| Output | Text of pages 1–10 | One .txt file; pages 11–12 need OCR |
Type 1-10 in Pages to leave out the scanned pages, or keep them in the range to see which page numbers are missing.
Where PDF to text goes wrong
Most surprises come from what is actually stored in the PDF.
Expecting text from a scan
A scanned page is a picture of words. There is no text to extract until OCR has recognised it.
Trusting complex layouts blindly
Tables, sidebars and text boxes can come out in an unexpected order. Read through the result before you publish or quote it.
Copying page by page
Copying from a PDF viewer breaks every line and repeats headers. Extracting the whole file at once rebuilds paragraphs and drops page numbers.
Uploading confidential documents
Contracts, payslips and medical letters are common reasons to extract text. This tool works in your browser, so there is nothing to upload.
The same privacy-first approach in our analytics
This converter keeps files on your device. TapCub applies the same idea to analytics: collect what you need, keep personal data out.
Cookieless visitor ID
Visitors are told apart by a keyed hash of the site, a salt, the IP address and the browser type. Nothing is written to the browser and the IP is never stored.
Learn moreCompliance centre
Choose balanced or strict, switch on IP truncation for some regions only, set the geography level and retention.
Learn moreSafeguards
Encryption in transit, sensitive fields encrypted at rest, masking by role, export and deletion of one person's data.
Learn morePDF to text questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How are headings detected?
The font size used by most characters counts as body text. Short lines in a size at least 15% larger become headings; the three largest sizes map to #, ## and ###.
Why convert a PDF to Markdown before giving it to an AI?
Headings and lists tell the model how the document is organised, so it can answer “what does section 3 say” and summarise per section. Markdown adds only a few characters, so it uses few extra tokens, and nothing has to be uploaded to a converter first.
Are tables converted to Markdown tables?
Not yet. PDFs do not store tables as tables, only as positioned text, so cells come out row by row as plain text. Check tables by eye, or rebuild them with the table converter.
Are images included?
No. Only the text is extracted. Export the pages you need as images with PDF to image.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Analytics that keep personal data out
TapCub counts visits without cookies and never stores IP addresses, with a compliance centre for stricter regions.