PrivacySchema

Your files say more than you wrote.

Deleted text, comments, author names, hidden sheets, GPS positions. PrivacySchema finds them on your own device, removes what it can, then reads the file again to prove what's left.

$ privacyschema check report.docx
Data is still in this file. Do not share it yet.
  still in file: Bank account number (IBAN) in report.docx (2)
  still in file: Failed redaction in report.docx
  still in file: 1 tracked change(s) with an author name
  still in file: Hidden or failed-redaction content is still in the file
This check looks for known patterns and hidden content. It does not detect names or addresses in free text, so review the file before sharing it.
exit code 2
$ privacyschema clean report.docx -o report-clean.docx
Nothing found, and every part of the file was read.
  done: Cleared document properties: docProps/core.xml
  done: Removed company and application fields from docProps/app.xml
  done: Accepted 1 tracked change(s) and removed deleted text in word/document.xml
This check looks for known patterns and hidden content. It does not detect names or addresses in free text, so review the file before sharing it.
Cleaned copy: report-clean.docx
exit code 0

Real output, unedited. The file is a Word test document from our public corpus with a bank account number left in a tracked deletion. It's renamed report.docx here.

It won't call a file clean when it isn't

A black box drawn over a bank number in a PDF hides it on screen. The number is still in the file, and anyone can copy it out. PrivacySchema can't remove this one yet, so it tells you, and returns exit code 2 so a script can stop the send.

$ privacyschema clean letter.pdf -o letter-clean.pdf
Data is still in this file. Do not share it yet.
  still in file: Bank account number (IBAN) in letter.pdf (2)
  still in file: Failed redaction in letter.pdf
  still in file: Hidden or failed-redaction content is still in the file
This check looks for known patterns and hidden content. It does not detect names or addresses in free text, so review the file before sharing it.
Cleaned copy: letter-clean.pdf
exit code 2

Across 140 test files it has never once said "clean" with data still inside.

How it decides

  1. Read every part of the file. Document text, properties, comments, tracked changes, hidden sheets, attachments, image data.
  2. Remove what it can, on a copy. Your original file is never changed.
  3. Read the copy again from scratch. The check runs on the new file's bytes, not on what the cleaner meant to do.
  4. Give a verdict. Anything it couldn't read counts against the file.
VerdictWhat it meansExit code
CleanNothing found, and every part of the file was read.0
Clean with limitsNothing found, but some parts couldn't be read. They're listed.1
Not cleanKnown data or hidden content is still in the file.2
Not checkedThe file couldn't be read, so nothing is confirmed.3

No verdict means "safe to share". It looks for known patterns and hidden content. It doesn't yet find names or addresses in ordinary text, or read text inside pictures. Always look at a file before you send it.

What it finds

44 of the 70 kinds of hidden data we test are removed today. The rest are found and reported, so you know before you send.

Word32 of 48 test files fully cleaned
Hidden itemToday
Author nameRemoved
Comment textRemoved
Company name in the file's propertiesRemoved
Custom XML dataFound, not removed yet. Reported.
Custom propertiesRemoved
Deleted text kept as a tracked changeRemoved
Deleted text tracked in headersRemoved
Document variablesFound, not removed yet. Reported.
Embedded objectsFound, not removed yet. Reported.
Formatting changes with namesRemoved
Hidden text in footnotesRemoved
Insertions with the editor's nameRemoved
List of reviewersFound, not removed yet. Reported.
Manager fieldRemoved
Name of the last person to save itRemoved
Names of people who commentedRemoved
Path to the template on someone's computerFound, not removed yet. Reported.
Photo data inside embedded picturesIn a part it can't read yet. Reported as unchecked.
Saved preview imageFound, not removed yet. Reported.
Text formatted as hiddenRemoved
Text hidden under black highlightingRemoved
Text hidden under black shadingRemoved
Title propertyRemoved
White text on a white pageFound, not removed yet. Reported.
Excel10 of 26 test files fully cleaned
Hidden itemToday
Author nameRemoved
Cell commentsRemoved
Company name in the file's propertiesRemoved
Custom propertiesRemoved
Data cached for pivot tablesFound, not removed yet. Reported.
Deleted cell text still storedFound, not removed yet. Reported.
Hidden columnsFound, not removed yet. Reported.
Hidden sheetsFound, not removed yet. Reported.
Links to other workbooksFound, not removed yet. Reported.
Named rangesFound, not removed yet. Reported.
Names of hidden sheetsFound, not removed yet. Reported.
Names of people who commentedRemoved
Sheets hidden from the Unhide menuFound, not removed yet. Reported.
PowerPoint4 of 12 test files fully cleaned
Hidden itemToday
Author nameRemoved
Company name in the file's propertiesRemoved
Embedded objectsFound, not removed yet. Reported.
Hidden slidesFound, not removed yet. Reported.
Slide commentsFound, not removed yet. Reported.
Speaker notesFound, not removed yet. Reported.
PDF18 of 30 test files fully cleaned
Hidden itemToday
Annotation authorsFound, not removed yet. Reported.
Annotation textFound, not removed yet. Reported.
Attached filesFound, not removed yet. Reported.
Author in document infoRemoved
Compressed XMP metadataRemoved
Custom document infoRemoved
Earlier saved versionsRemoved
Editing-app data on pagesFound, not removed yet. Reported.
Filled-in form valuesFound, not removed yet. Reported.
Info values after escaped charactersRemoved
Info values in UTF-16Removed
Info values stored as hexRemoved
Text under a black boxFound, not removed yet. Reported.
Title in document infoRemoved
XMP metadataRemoved
JPEG photos12 of 12 test files fully cleaned
Hidden itemToday
Data hidden after the end of the imageRemoved
Embedded commentRemoved
GPS locationRemoved
Image descriptionRemoved
Photographer nameRemoved
XMP metadataRemoved
PNG images8 of 8 test files fully cleaned
Hidden itemToday
Compressed text chunksRemoved
EXIF dataRemoved
International text chunksRemoved
Text chunksRemoved
WebP images4 of 4 test files fully cleaned
Hidden itemToday
EXIF dataRemoved
XMP metadataRemoved

Results

Measured on 140 test files, each hiding one item, plus 11 control files that hide nothing.

Said "clean" with data still inside
0
Hidden item removed
88
Left in, and reported as not clean
42
Left in a part it reported as unreadable
10
False alarms on control files
0
Files damaged by cleaning
0

Full method and the leaderboard are on DSAR Benchmarks.

Use it

PrivacySchema is in early development. It's a Python command-line tool, tested on Windows today. Tests for macOS and Linux are set up and start running when the source code is published on GitHub under the Apache-2.0 licence.

Want to try it before then, or have a subject access request to get through? Email webcomplianceuk@gmail.com.