MASKPDF
FOIA

Redact a PDF for a FOIA response

The Freedom of Information Act requires agencies to release records, and it lists nine exemptions where they may withhold. Exemption 6 covers personnel and medical files and similar files whose disclosure would be a clearly unwarranted invasion of personal privacy. Where a record mixes exempt and non-exempt material, the statute requires the agency to release the remainder — and a redaction that leaves the words underneath the black bar has not released it.

The instrument5 U.S.C. § 552 — Public information; agency rules, opinions, orders, records, and proceedings

Last reviewed on 18 November 2026.

All the guides
The rule

What the rule actually requires

5 U.S.C. § 552 is the statute. Three parts of it bear directly on the redaction you are about to do, and the last of them is the one most often forgotten.

The exemption itself. § 552(b)(6) lets an agency withhold personnel and medical files and similar files the disclosure of which would constitute a clearly unwarranted invasion of personal privacy. The Department of Justice's guide to the FOIA describes the analysis as two lines of inquiry: whether the information at issue sits in a personnel, medical or “similar” file covered by the exemption, and if so, whether disclosure would constitute a clearly unwarranted invasion of personal privacy, by balancing the privacy interest that would be compromised by disclosure against any public interest in the requested information.

The duty to produce. § 552(a)(3)(A) requires an agency, upon a request that reasonably describes the records and is made in accordance with its published rules, to make the records promptly available to any person, and § 552(a)(3)(C) requires reasonable efforts to search for the records in electronic form or format.

The duty to segregate, which is the one people forget. The statute does not permit an agency to withhold a whole record because part of it is exempt. It provides that any reasonably segregable portion of a record shall be provided to any person requesting such record after deletion of the portions which are exempt under this subsection, and that the amount of information deleted, and the exemption under which the deletion is made, shall be indicated on the released portion of the record. Where it is technically feasible, the amount and the exemption must be indicated at the place in the record where the deletion was made.

The regulations cited on this page are referenced for informational purposes only and do not constitute legal advice. MaskPDF is a document tool, not a compliance certification. Organizations with formal compliance obligations should consult counsel and validate their own release.

The tool

What MaskPDF does about it

MaskPDF decides nothing about your request. It removes the text you mark from the exported file's text layer and rewrites the metadata of the file it exports. What follows is where that lands against the statute, and where it does not reach.

It removes the characters rather than covering them. The marked text is left out of the exported page's text layer and a black rectangle is drawn over the area. The statute requires the segregable remainder of a record to be released after the exempt portions are deleted; a redaction that leaves the words under the bar has not deleted them, and the released portion would still carry the material the exemption was relied on to withhold.

It rewrites the metadata of the export, which is a FOIA question as well as a privacy one. A released PDF frequently carries the name of the person who produced it in its properties. MaskPDF writes an empty Author and Subject, the original filename as Title, “MaskPDF” as Creator and Producer, and the current timestamp as Created and Modified, so the released copy does not identify its own author.

It runs in the office that holds the record. The document is parsed, rendered, OCR'd and written on the machine of the person doing the redaction, so there is no copy of an unredacted record on a third party's server. For a records request, that keeps the material being redacted inside the agency that owes the response.

It does not do the parts of the job that belong to the agency. It does not decide what is exempt, it does not write the justification for a withholding, it does not build the Vaughn index, and it does not indicate on the released record the amount of information deleted and the exemption relied on — that indication is required by § 552(b), and it is a piece of the response you assemble, not something a redaction tool can infer.

The work stays in your browser

pdf.js parses and renders the file, Tesseract.js reads the text off scanned pages, and pdf-lib writes the export — all three run in the tab. The document you open, the text on its pages, your marks and the file you export never leave your machine.

The characters are removed, not covered

On export the marked text is left out of the exported file's text layer and a black rectangle is drawn over the area. What was removed is not there to be selected, copied, searched, or read back by an OCR pass.

29 patterns to start from

Auto-detect flags email addresses, phone numbers in ten national formats, dates, IP addresses, Social Security numbers, card numbers, IBANs and a set of national identifier formats. Every match is a mark you keep or delete — the scan proposes, you decide.

The metadata is rewritten on export

Author and Subject are left empty, the original filename becomes the Title, “MaskPDF” becomes the Creator and Producer, and Created and Modified carry the current timestamp. The author and software signatures of the original file are not carried into the export.

Batch, undo, and hand-off

Process a folder and get one ZIP of redacted files. Every mark can be moved, resized and undone, so a mistake does not mean starting the document again. A link can be copied that restores your marks when the same PDF is loaded.

Five OCR languages

English is included on the free tier. Spanish, French, German and Simplified Chinese need a Single token or a Pro subscription. The OCR engine and its language packs are served from this site rather than from a third party.

Free up to 5 pages

The free tier opens a file of up to 5 pages. A Single token is $3 once and covers one file of any length. Pro is $9 a month and covers 30 documents over 5 pages a month.

The check

How to check it yourself

A response that has been redacted wrongly is a response that has to be corrected under oath, so the check is worth doing properly. Five checks, the last of which is about the response rather than about the file.

  1. 01

    Select across the redacted area

    Open the exported PDF, drag a selection across the black rectangle, and copy it. Nothing comes out. If characters come out, the exempt text is still in the file and the released portion is not what it appears to be.

  2. 02

    Extract the text and search it

    Run a text extraction over the exported file — pdftotext exported.pdf - on a Mac or Linux, or your reader's own extraction — and search the output for the withheld words. The marked page is rebuilt as an image with an invisible text layer over the parts that were kept, so the layer holds what you did not mark and nothing else.

  3. 03

    Read the document properties

    Open the file's properties. The Author and Subject should be empty, the Title should be the original filename, and Creator and Producer should both read MaskPDF. An export that still carries the producing officer's name in its Author field tells a requester something the response never meant to say.

  4. 04

    Re-OCR the exported page

    Run OCR over the exported page and read the result. The black rectangle is baked into the page's image layer, so an OCR pass reads a bar where the withheld text was and reconstructs nothing. A redaction that only covered the words would be read straight back.

  5. 05

    Check the released portion against § 552(b)

    The statute requires the amount of information deleted and the exemption under which it was deleted to be indicated on the released portion of the record, and where it is technically feasible, at the place in the record where the deletion was made. Read your release note against that requirement: a file whose text is genuinely gone, with no indication of what was removed or under which exemption, satisfies only the first half of it.

Questions

Questions this comes up with

Does MaskPDF make my response FOIA-compliant?
No. It removes the characters you mark from the exported file's text layer. Whether a record is exempt under § 552(b)(6), what the segregable remainder is, and what justification and indication accompany the withholding are decisions for the agency making the response.
Does redaction remove the text or cover it?
Remove it. The marked characters are left out of the exported page's text layer and a black rectangle is drawn over the area they occupied. Nothing remains to be selected, copied, searched or read back by OCR.
Can I redact a scanned PDF?
Yes. Run OCR on the page first and the text is detected for you to mark; the redaction itself is the same operation on every page. English OCR is included on the free tier, and Spanish, French, German and Simplified Chinese need a Single token or a Pro subscription.
Do I need an account?
To open your own PDF, yes — a free one, and there is no payment and no card. The sample document opens for anyone, and the whole editor works on it: rendering, detection, OCR, marking and export. A Pro subscription needs an account, because the plan lives on it; a Single token does not, because it is kept in your browser's own storage.
Does MaskPDF upload the file?
No. The document, the text on its pages, your marks and the exported file are processed in your browser tab and never sent anywhere. The site records which buttons get clicked and the rough size of a file, so the tool can be seen being used, but no request carries your document.

Redact the file, then check it

Open a PDF, mark what has to go, and export a copy in which the marked characters are not in the file’s text layer at all. The file stays in your browser the whole way.