Extract PDF Highlights and Comments
You read a paper, you highlighted forty passages, and now you want them in your notes. Every PDF reader can show you the annotation list; almost none will give you the text. That is because a highlight does not store the words it covers — it stores four corners and a colour — so the words have to be read back off the page. This does that.
Drop PDFs here or click to select
Several files at once is fine
Why the highlighted text is the hard part
A Highlight annotation in the PDF format stores quadPoints — the corners
of the rectangles the yellow was painted over — plus a colour, an author and a date. Its
contents field holds the note you typed on the highlight, which for most people
is empty most of the time. The words underneath are not in the annotation at all; they are in
the page's content stream, and nothing connects the two.
So the connection is made here: the page's text runs are laid out with their real positions, and every run whose centre falls inside one of the highlight's rectangles is collected, sorted into reading order, and joined. Using the centre rather than any overlap is what stops a highlight from claiming the descenders of the line above it, and what lets a quad drawn slightly short of a word still claim the whole word.
This is also why an export from a scanned PDF with no text layer comes back with colours and no words: there is no text to find. Run OCR over it first and the highlights start resolving.
What comes out
For each annotation: the page number, the kind, the colour, the text it covers, any note attached to it, the author, and the date.
- Markdown groups by page, quotes the highlighted text as a blockquote and puts the metadata in italics underneath, with any note as ordinary text. It goes straight into Obsidian, Notion, a wiki, or a commit message.
- CSV is one row per annotation with proper quoting, for a spreadsheet or a review log — filter by colour, sort by page, tick things off.
- JSON is the same fields as data, for a script.
Colours are named as well as given in hex — yellow, green, pink —
because a colour scheme is how most people organise highlights, and #ffe680 is
not something you can filter a spreadsheet by comfortably. The nearest of eight names is used,
with the hex kept alongside it in CSV and JSON.
Which annotations are included
Highlights, underlines, strikeouts and squiggles; sticky notes and free-text boxes; ink drawings, shapes, stamps and file attachments. Popup annotations are skipped — they are the little window a note is displayed in, not the note — and so are form widgets, which are fields rather than comments; for those use fill PDF form. Links are off by default because a document with a bibliography has hundreds of them and none of them are your notes; tick the box when you want them.
An annotation with no text, no note and no author is dropped as furniture — the empty rectangles some editors leave behind.
Privacy
100% client-side. The PDF is parsed in your browser with pdf.js. Nothing is uploaded, which matters more than usual here: annotations carry the name of whoever made them.
Related tools
- PDF to text — the whole document rather than the parts you marked.
- PDF to Markdown — structure preserved, for the same note-taking destination.
- Flatten PDF — burn the annotations into the page so they cannot be edited or removed.
- PDF inspector — what else is inside the file.
- OCR PDF — give a scan a text layer so its highlights can resolve.