I am looking for PDF anonymizer software that will automatically remove potentially identifying metadata.

It must be free as in beer, and it must run on OS X.

It does not need to be perfect; this is for convenience, not for legal applications.

Command line tools are okay for as long as they don't need arcane syntaxes to achieve this goal. Ideally it should be a tool purpose-made for this. It is possible that this is achievable with Ghostscript with complicated command line options, but I can't keep those in mind, so it's not what I'm looking for.

Adobe Acrobat does this but it is not free.

  • The suggested tool does certainly what it is supposed to. However, there is a speciality in PDF, which is not dealt with the tool: private data. Some times, private data is also considered to be metadata, and, actually, the most embarrassing bloopers with PDF do not originate in the metadata, but in the private data. Private data means data the creating application embeds in the file. It is known that MS Word can embed a lot of that, including changing history and other stuff. It is up do you to decide whether this is up to your concerns…
    – Max Wyss
    Commented May 10, 2016 at 6:19
  • @MaxWyss I'm definitely open to more suggestions for better tools. Multivalent used to be able to remove that sort of data, but it also reprocessed and sometimes broke the PDF. And some years ago its authors decided to remove this functionality and to try prevent people from downloading old versions of the software that still have it ...
    – Szabolcs
    Commented May 10, 2016 at 7:40
  • The tool just coming to my mind (APSaveAs by Appligent) is not free, and most likely others are neither. You'd have to try it out, and be aware that it is shunned at practice, but "refrying" should get rid of personal data. Refrying means passing the PDF through a PostScript printer driver, and recreate the PDF using Distiller (or Ghostscript).
    – Max Wyss
    Commented May 10, 2016 at 18:38

3 Answers 3


For a ready written application you can use ExifTool with a list of parameters that you would like to remove something like:

exiftool -Author= -Creator= name_of_pdf.pdf -o clean.pdf 
  • if you are doing this sort of thing regularly you can put the list of values to blank into an external file or use a bash script.

ExifTool is:

  • Free, gratis & Open Source
  • Cross Platform written in perl
  • Available as standalone OS-X package and Windows exe
  • Works on lots of other file formats
  • I have exiftool but I had no idea it could handle PDFs. But wouldn't -all= be better than -Author= -Creator=?
    – Szabolcs
    Commented May 9, 2016 at 19:26
  • @Szabolcs - -all would work but there may be some data you would like to preserve. Commented May 9, 2016 at 20:01
  • Pro tip: add alias pdfanon='exiftool -Author= -Creator=' to your .bashrc file and run it like pdfanon in.pdf -o out.pdf. ;) Commented May 9, 2016 at 20:04
  • I wanted to note that exiftool does give a warning that changes to PDF metadata are reversible and may be recovered. Regardless, for my purposes exiftool is good enough. I don't need to protect against significant de-anonymization efforts, I just want to make sure that nothing revealing is accidentally left in a visible place.
    – Szabolcs
    Commented May 12, 2016 at 13:23

Python-based Metadata Anonymisation Toolkit 2 that can clean metadata from various file types:

usage: mat2 [-h] [-v] [-l] [--check-dependencies] [-V]
            [--unknown-members policy] [-s | -L]
            [files [files ...]]

Metadata anonymisation toolkit 2

positional arguments:
  files                 the files to process

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -l, --list            list all supported fileformats
  --check-dependencies  check if MAT2 has all the dependencies it needs
  -V, --verbose         show more verbose status information
  --unknown-members policy
                        how to handle unknown members of archive-style files
                        (policy should be one of: abort, omit, keep)
  -s, --show            list harmful metadata detectable by MAT2 without
                        removing them
  -L, --lightweight     remove SOME 

Exiftool does not remove usernames from pdf annotations. Here's a small script that uses PyMuPDF library to remove metadata and pdf anotation usernames.

#!/usr/bin/env python
    import fitz
except ImportError as e:
    import subprocess
    print('Trying to install pip install PyMuPDF')
    subprocess.call("pip install PyMuPDF".split())
    print('Try pip install PyMuPDF')
import sys
if len(sys.argv) < 2:
    raise ValueError("Please provide a pdf to anonymize")
if len(sys.argv) < 3:
    outfilename = filename.replace('.pdf', '.anon.pdf')
    outfilename = sys.argv[2]
filename = sys.argv[1]
doc = fitz.open(filename)
metadata = doc.metadata
for k, v in metadata.items():
    if k not in ['format']: # retain some metadata
        metadata[k] = ''

for page in doc:
    for annot in page.annots():
        info = annot.info
        info['title'] = ''


Link to gist source: https://gist.github.com/wecacuee/f1e92d421312b7c7c1907667f4f3a318

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.