Highlights to Flashcards
Turn ==marked== text or PDF highlights into page-referenced notes and cloze or Q/A cards.
How it works
Collects what you highlighted — ==marked== or bold passages and > quotes in pasted notes, or the highlight and underline annotations of a PDF — into a note list with page references, and turns each into a flashcard: short highlights become cloze gaps of their sentence, definitions become question-and-answer cards, longer passages become recall cards. The cards use the shared syntax of Lessonleaf and Deckwright and open in Deckwright’s Study view. Rule-based, no AI.
- Pasted text: ==…== and <mark>…</mark> are highlights, **…** and __…__ too (switchable), and every block of “>” lines is one quote. # headings set the section, “Page 12”, “p. 12”, “[p. 12]” lines or form feeds the page.
- PDF: pdftotext lists every word with its box; qpdf reads the Highlight, Underline, Squiggly and StrikeOut annotations with their QuadPoints. A word belongs to a highlight when its centre lies inside one of the quadrilaterals (1 pt tolerance) and it overlaps at least half its height; words keep the reading order of the page, hyphenated line breaks are joined. The sentence around the highlight is found by walking to the nearest . ! ? before and after it.
- Cards: a highlight of at most N words that covers less than 60 % of its sentence becomes a {{c1::…}} gap (several highlights in one sentence share one note with c1, c2 …). Longer passages become a Q/A card when they read like a definition (“Term: …”, “Term – …”, or in English “X is/are/means/refers to …”), a cloze when marked words are inside a quote, and otherwise a “recall the passage” card.
- The cards are written in the shared card syntax and read back with the same parser as Deckwright’s Study view and Lessonleaf, so the card count shown is what those apps will show.
Rule-based: the cards are only as good as the highlights. Check each card before studying. Scanned PDFs have no text layer — run them through OCR first. The PDF is processed on the server for this request and not kept.
Sources
- ISO 32000-1 (PDF 1.7), 12.5.6.10 Text Markup Annotations (QuadPoints) (Adobe / ISO)
- pdftotext manual (-bbox-layout) (Poppler)
- Anki Manual — Cloze deletion (Ankitects)
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Lessonleaf Study notebook with flashcards
Take notes as an outline, write flashcards inside them and review what is due today.
-
Deckwright Slide deck studio
Write Markdown, get an accessible slide deck — charts, diagrams, PDF, HTML and PowerPoint.
Related tools
- Cloze Card Maker – Sentences plus key terms → fill-in-the-blank cloze cards for Anki, Deckwright, Lessonleaf.
- Flashcard Format Converter – Convert flashcards between Anki text, CSV, Quizlet, Mochi, Obsidian and Lessonleaf.
- Exam Study Planner for Flashcards – How many new cards and reviews a day so every flashcard is learned before the exam.
- Searchable PDF OCR – Make scanned PDFs searchable and copyable with OCRmyPDF and Tesseract, optionally as PDF/A.
- Flashcards from Markdown, CSV or Anki Text – Turn notes into flashcards: Q:/A: pairs, term :: definition lines, cloze gaps, CSV or Anki text.
How to use Highlights to Flashcards
Turn marked passages in your notes or the highlights in a PDF into a page-referenced note list and cloze or question cards.
What it is for
Highlighting while you read is easy; turning those highlights into something you can review is the part that never happens. This tool collects what you marked and makes flashcards from it with fixed, transparent rules — no AI writes or guesses anything.
It reads two kinds of input. In pasted text, passages between ==double equals== or HTML mark tags count, so do bold passages and every block of lines starting with ">". Lines such as "Page 12" (or form feeds from a PDF text export) set the page, and # headings set the section. Or upload a PDF: the highlight, underline, squiggly and strike-out annotations are read together with the words under them, including any comment you typed on the highlight.
The result is a note list with page references and cards in the shared card syntax of Lessonleaf and Deckwright, ready to study or to convert for Anki.
Worked example
The sample notes have the heading "Cell biology", a "Page 12" line, ==powerhouse==, ATP, ==nucleus== and ==DNA== marked inside sentences, a quote "Osmosis is the movement of water across a semipermeable membrane.", then "Page 13" and a whole marked two-sentence passage about ribosomes.
The tool finds 6 highlights and makes 6 flashcards. "powerhouse" becomes "Mitochondria are the {{c1::powerhouse}} of the cell." Nucleus and DNA sit in the same sentence, so they share one note with two gaps: "The {{c1::nucleus}} stores the {{c2::DNA}} of the cell." — two cards. The quote reads like a definition, so it becomes "Q: What is Osmosis?" with the rest as the answer. The ribosome passage is long and has no definition shape, so it becomes a recall card: "Recall the passage (Cell biology, p. 13) that starts …". The notes list shows each highlight with "— p. 12" or "— p. 13".
The PDF example has two highlights on page 1: "powerhouse" (with the comment "key term") becomes a cloze, and the highlighted sentence about osmosis becomes "What is Osmosis?".
How to read the result
- Metrics — highlights found, flashcards made (as Deckwright and Lessonleaf will count them) and how many of each card type.
- Highlights table — the text, its kind (mark, bold, quote or the PDF annotation type), page, section and comment.
- Cards — the card text to copy, download, open in Deckwright's Study view or convert with the Flashcard Format Converter.
- Notes with page references — a Markdown list to keep with your notes or paste into Lessonleaf.
Tips and common mistakes
- Highlight the key term, not the whole paragraph: short highlights inside a sentence make the best cloze cards.
- Use "Term: definition" or "Term – definition" lines for vocabulary; they become question-and-answer cards in any language.
- "What is …?" questions are written only for English text; set the language so other texts are not forced into English questions.
- Switch off "Bold text counts" if your notes use bold for emphasis, not for key terms.
- Scanned PDFs have no text under the highlights. Run them through Searchable PDF OCR first and highlight again.
FAQ
Which PDF highlights can it read?
Text markup annotations (highlight, underline, squiggly, strike-out) on pages with a text layer. Sticky notes, ink drawings, shapes and rotated pages are not read; the result says so.
What if my PDF has no highlights?
You get the extracted text so you can mark passages with ==…== and paste them back.
Is my PDF stored?
It is processed on the server for this request and not kept. Pasted text works the same way.
Why did a highlight become a "recall the passage" card?
It was too long for a gap and did not look like a definition. Highlight a shorter phrase, or mark key words inside the quote.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://highlightstoflashcards.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://highlightstoflashcards.usefulweb.app/mcp· tool namehighlights_to_flashcards
Example request
curl -s -X POST https://highlightstoflashcards.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"text":"# Cell biology\nPage 12\nMitochondria are the ==powerhouse== of the cell. They make **ATP** by oxidative phosphorylation.\nThe ==nucleus== stores the ==DNA== of the cell.\n\n> Osmosis is the movement of water across a semipermeable membrane.\n\nPage 13\n==Ribosomes build proteins from amino acids. They read the codons of mRNA.==\n"}'