Mark and rasterize sensitive areas in a PDF
Drawing a black rectangle over text is not necessarily redaction. In many PDF editors, the original text remains under the rectangle and can still be copied, searched, or extracted.
This tool takes a destructive approach for pages that contain marks: it renders the page as an image, burns the black areas into those pixels, and places the flattened image on a fresh PDF page. Unmarked pages are copied rather than rasterized.
Why an overlay can fail
PDF pages can contain selectable text, vector shapes, images, annotations, optional layers, forms, and attachments. Placing a black rectangle above one object may leave the original object intact below it.
A recipient may be able to select the covered text, remove the overlay, search the document, inspect comments, or extract content with another parser. Appearance alone is therefore an incomplete test.
What rasterizing a marked page changes
The marked page is rendered to pixels, the rectangles are burned into that image, and a new page is built from the flattened result. The original text and vector objects from that marked page are not copied into the new page content stream.
The tradeoff is substantial: text search and selection disappear, accessibility is reduced, links and forms are lost, and image resolution controls quality and file size. Unmarked pages remain original PDF pages and need their own review.
Mark context, not only characters
Extend a mark beyond the complete glyphs and examine nearby context. A column heading, repeated account suffix, filename, date, or page header can identify information even after the obvious value is covered.
Inspect every page and every occurrence. The tool does not detect names or numbers, and it cannot decide what a disclosure rule considers identifying.
Try to break the result before sharing it
Search for each removed phrase, drag a selection across the area, copy page text, inspect properties, list attachments, and open the file in a second viewer. Zoom into every edge of every mark.
For regulated, legal, medical, or high-consequence disclosure, combine these checks with the organization's approved redaction process. A browser tool cannot certify compliance for every document or jurisdiction.
Check the information around every covered area
Removing the selected pixels is only one part of disclosure review. File names, running headers, page numbers, repeated identifiers, bookmarks, attachment names, comments, and nearby context can reveal the same fact indirectly. A remaining sentence may identify a person even when the name is gone. Review the document once as a technical file and again as a reader who is actively trying to infer the removed information. If the consequence of disclosure is high, have a second person compare the exported copy with a written removal list and the organization’s approved process before release.
Quick start: LocalUtils
- Add a PDF and wait for page previews to render.
- Open each page that contains sensitive material and draw boxes slightly beyond the full area that must disappear.
- Review every page at useful zoom, including headers, footers, repeated identifiers, attachments, comments, and pages with no marks.
- Export the rebuilt PDF, reopen it in another viewer, search for the removed text, and inspect document properties before sharing.
What the browser does
PDF.js renders marked pages at approximately 2.5 times the page scale. The redaction rectangles are painted into the canvas. PDF-lib then creates a fresh page containing that raster image.
Rasterization removes the marked page's original selectable text and vector content from the exported page, but it also changes quality, accessibility, searchability, forms, links, and file size. Unmarked pages retain their original PDF content streams.
Inputs and outputs
- Input: a PDF that PDF.js can render.
- Marks: rectangular regions drawn on page previews.
- Output: a PDF with rasterized marked pages and copied unmarked pages.
Limits to know before you start
- The tool cannot know whether every sensitive area was marked.
- Unmarked pages are copied, so their original text, metadata, annotations, and attachments require separate review.
- Rasterized pages lose selectable text and may be less accessible.
- A visual black box can hide too little if the mark does not cover the complete glyph or surrounding context.
Verification checklist
- Search the exported PDF for every removed name, number, and phrase.
- Attempt to select or copy text from each rasterized page.
- Inspect metadata, attachments, comments, and unmarked pages independently; redaction marks do not clean them.
Troubleshooting
- If text appears outside a box, enlarge the mark and export again.
- If a page looks soft, compare the output at normal reading zoom; rasterization trades editability for destructive flattening.
- If the PDF contains forms, signatures, layers, or attachments, use a dedicated PDF security workflow and inspect those objects separately.
Questions people ask
Is a screenshot of the page enough?
A screenshot also flattens pixels, but manual screenshots can crop content, reduce quality, change page size, or omit pages. A controlled export is easier to review.
Why inspect unmarked pages?
They are copied to preserve quality, so their searchable text, annotations, metadata, and attachments are not removed by marks elsewhere.
Can hidden attachments be redacted with rectangles?
No. Rectangles affect rendered page pixels. Attachments and other document-level objects require separate removal and inspection.
