Annotate PDF

Mark up a PDF with highlights, boxes, lines and typed notes, drawn straight into the page.

Runs on your devicePDFWorkingNo account needed

What this tool does

Annotate PDF takes a JSON array in which each entry describes one mark, and draws every one of them into the page with pdf-lib. Six types are understood: highlight, box, ellipse, line, strikeout and note. An entry gives a page and a position, with sizes and coordinates in points — the unit the PDF format itself uses, 72 to the inch — and can carry its own colour and opacity to override the defaults set beneath the box, along with a stroke thickness that has no control of its own and sits at 1.5 points around a box or ellipse, 1.2 through a strikeout and 1 along a line until an entry says otherwise. Pages that carry a /Rotate value are handled properly, so a mark placed on a sideways scan lands where you meant it rather than a quarter turn away.

The thing to understand before you rely on this is that the marks are not comment objects. A reader's own review tools create annotation entries that float above the page — clickable, movable, attributed to an author, collapsible, removable, and gatherable into a comment summary. Nothing of that kind is produced here. The highlight is a filled rectangle in the page's content stream and the note is drawn text, which cuts both ways: every viewer and every printer shows them identically, with no sidebar to switch on and no reliance on the recipient using the same software, and equally nobody can reply to a note, hide the markup, or take a box off again. The output is a new file, so keep the original if you want a clean copy.

The second boundary is that the tool never looks at the text on the page. It cannot be asked to find a phrase and highlight it; you give it numbers, and it draws where the numbers say. There is no click-and-drag surface and no live preview, so placement is normally read off a page, tried, and nudged. Nothing checks a mark against the edge of the sheet either — unlike the field placement in Create PDF Form, an annotation with a wrong coordinate is drawn off the page and simply never appears, which looks like a failure but is not one. A highlight is painted on top of what is already there rather than behind it, so the default 40 per cent opacity tints the words underneath; push it to 100 and the rectangle hides them completely.

Everything runs in this browser tab, and the document is not sent anywhere — worth knowing when the thing being reviewed is a contract, a tenancy agreement or a set of medical notes. A few smaller limits round it out. Each PDF in the queue is processed on its own and receives the same set of marks, so a page number in the JSON has to exist in every document you queue. Note text is set in one of the eight fonts the picker offers — Helvetica, Times and Courier, the first two with bold and italic cuts and Courier with bold only — all of them faces a PDF reader carries built in, and all confined to WinAnsi encoding, so Greek, Cyrillic, CJK and emoji arrive as question marks. Colours have to be hex: an entry that says red rather than #ff0000 is not refused, it is quietly drawn in the fallback yellow. And a note takes the default colour unless you give it one, which means it comes out in the same yellow that suits a highlight and reads badly as text.

How to use it

  1. Choose the PDF. One document is annotated per run, though several can share the queue and each is returned separately with -annotated added to its name. A password-protected file cannot be parsed and is refused with a pointer to Unlock PDF.
  2. Write the marks as a JSON array. The box opens with a working example. Only a note's text is compulsory — leave it out and the run stops, naming the entry that is missing it. Everything else falls back: no type means a highlight, no page means page 1, x and y start at 40, width at 200, and height at 16 for everything except a line, which has none. A highlight or box given a width or height of zero is refused rather than drawn, as is a type outside the six names, and so is a page number the document does not have.
  3. Say which edge y is measured from. Bottom of the page is the PDF convention and the setting the sample assumes. Top of the page is there because most other software counts downwards, and it is the more common source of a mark that lands in the wrong half of the sheet.
  4. Set the defaults beneath the box. A hex colour, an opacity between 5 and 100 per cent, and the font used for notes apply to every entry that does not name its own. Notes ignore the opacity default and are drawn solid unless a value is set on that entry. Watch the units: the slider is a percentage, but an opacity written inside an entry is a fraction between 0.05 and 1, and anything from 1 upwards is clamped to fully opaque — so write 0.4 there, not 40.
  5. Run it and check the count. It reports how many marks were drawn and a count for each type, so a spec that quietly parsed into fewer entries than you intended shows up straight away.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Returning a contract with objections

Box the clause, strike through the sentence you want gone, and put the reason beside it as a note. What comes back is legible in whatever the other side opens it in.

Markup that has to survive printing

Reader comments often print as a separate list, or not at all. Marks written into the page come off the printer exactly where they sit on screen.

Marking up a scan with no text layer

Highlighting in a reader needs selectable text, which a photographed or faxed page does not have. Coordinates work regardless of what is underneath them.

Applying the same review marks across a set

Documents built from one template put the same block in the same place every time, so one JSON array queued against all of them stamps every copy identically.

Questions

Does the marked-up file go anywhere?
No. pdf-lib is loaded into this tab and reads, draws and rewrites the document on your own machine. Once the library has cached, the tool keeps working with the network switched off.
Can the recipient delete or reply to these marks?
No, and that is the trade. They are page content rather than annotation objects, so there is no comment thread, no author name, no timestamp and nothing to click. Removing one afterwards means editing the page in a PDF editor, which is why the original is worth keeping.
Can it highlight a word or a phrase for me?
No. It draws at the coordinates you supply and never inspects the text, so finding the position is your half of the job. If you need to select words on screen and highlight what you selected, that is a job for the review tools in a PDF reader.
Why is my highlight covering the text instead of tinting it?
Because it is painted over the page, not behind it. Opacity is what lets the words show through: 40 per cent is the default, lower is paler, and 100 per cent is an opaque block. An entry can set its own, but that one is a fraction rather than a percentage — 0.4, not 40, since a 40 inside an entry clamps to fully opaque and paints exactly the solid block you were trying to avoid.
Nothing appeared where I expected it. What went wrong?
Usually the origin setting — bottom-up and top-down coordinates put a mark on opposite halves of the page. Failing that, a value far enough off puts the mark outside the sheet, and since no bounds check runs, it is drawn into empty space with no error.
What can a note contain?
Any text the eight fonts in the picker can encode, which covers accented Latin letters, curly quotes and the euro sign. Characters outside that set — Greek, Cyrillic, Chinese, Japanese, emoji — are replaced with question marks. Give a note its own dark colour and a width if you want it to wrap.
Do I need to flatten the result afterwards?
No. The marks are already part of the page, so Flatten PDF has nothing here to stamp down; it exists for interactive form fields. Note also that re-saving the document invalidates any digital signature it arrived carrying.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.