Posted inLinux / Open Source / Security

Dangerzone: Convert Potentially Dangerous PDFs, Office Documents and Images to a Safe PDF

Dangerzone open source document sanitization application

How many times have you heard “Don’t open attachments”? It’s solid advice, but most people don’t follow it and, depending on your job (if you’re a journalist, for example), sometimes it’s almost impossible to follow.

Dangerzone is a free and open source application that converts potentially dangerous PDFs, office documents and images into sanitized PDF files.

Last updated: November 20, 2026.

Why Can Documents Be Dangerous?

PDFs and office documents are incredibly complex. Depending on the document format and the software used to open it, they can contain embedded scripts, macros, external resources and other active content.

Documents can also be crafted to exploit security vulnerabilities in applications such as Preview, Adobe Reader, Microsoft Word or LibreOffice.

For example, an attacker could send you a specially crafted Word document designed to exploit a vulnerability in your version of Microsoft Word.

Keeping your software updated reduces the risk of known vulnerabilities being exploited, but it doesn’t eliminate the risk entirely.

This is where Dangerzone comes in.

What Is Dangerzone?

Dangerzone is an open source document sanitization tool maintained by the Freedom of the Press Foundation and distributed under the AGPLv3 license.

The project was inspired by Qubes trusted PDF, which uses disposable virtual machines to convert untrusted documents.

Rather than attempting to detect malware inside a document, Dangerzone reconstructs the document from its visual contents, preventing embedded scripts and other active content from carrying over into the resulting PDF.

How Does Dangerzone Work?

Here’s a simplified overview of the conversion process:

  1. Dangerzone opens the original document inside an isolated sandbox.
  2. If necessary, the document is converted into PDF format.
  3. Each page is rendered into raw pixel data.
  4. A new PDF is constructed from those pixels outside the conversion sandbox.
  5. Optional optical character recognition (OCR) adds a searchable text layer to the new document.

The conversion sandbox has no network access, limiting the ability of malicious documents to contact external servers during processing.

Modern versions of Dangerzone use Podman for container isolation and gVisor for an additional security layer.

On macOS and Windows, the application includes Podman and runs the container inside a lightweight Linux virtual machine. On Linux, it uses the system’s Podman installation.

Native Qubes OS integration, currently in beta, uses disposable virtual machines instead.

For a more detailed technical explanation, check out the official documentation.

Features

  • Free and open source software.
  • Local document conversion without uploading documents to an online service.
  • Isolated document processing without network access.
  • Removal of embedded scripts, attachments and original document metadata.
  • Optional OCR using Tesseract.
  • Support for multiple documents and file formats.
  • Graphical interface and command line support.
  • Independent updates for the conversion sandbox.
  • Available for macOS, Windows and supported Linux distributions.

Supported File Formats

  • PDF (.pdf)
  • Microsoft Word (.docx, .doc)
  • Microsoft Excel (.xlsx, .xls)
  • Microsoft PowerPoint (.pptx, .ppt)
  • OpenDocument Text (.odt)
  • OpenDocument Spreadsheet (.ods)
  • OpenDocument Presentation (.odp)
  • OpenDocument Graphics (.odg)
  • Hancom Word Processor (.hwp, .hwpx)
  • EPUB (.epub)
  • JPEG (.jpg, .jpeg)
  • GIF (.gif)
  • PNG (.png)
  • SVG (.svg)
  • TIFF (.tif, .tiff)
  • BMP and portable bitmap formats (.bmp, .pnm, .pbm, .ppm)

Some formats may have platform specific limitations. For example, Hancom documents are not supported by the native Qubes OS integration.

The output is always a PDF, regardless of the original document format.

Download and Install Dangerzone

At the time of this update, the current release is Dangerzone 0.11.1, released on October 22, 2026. It includes security fixes, stability improvements and expanded Linux distribution support.

You can read more in the official release announcement.

macOS

Dangerzone is available for both Intel and Apple silicon Macs.

Download the appropriate DMG file from the official website.

Alternatively, you can install Dangerzone via Homebrew:

brew install --cask dangerzone

Windows

Windows users can download the installer from the official website or install Dangerzone through the Microsoft Store.

Alternatively, use Windows Package Manager:

winget install FreedomofthePressFoundation.Dangerzone

Windows on ARM is not currently supported.

Linux

Official installation packages are available for supported versions of Ubuntu, Debian and Fedora.

Installation instructions are also available for Tails and Qubes OS, with native Qubes integration currently in beta.

Users of other Linux distributions, including Arch Linux, should keep in mind that their distributions may not be officially supported.

Check the official installation guide and supported platforms documentation before installing.

NOTE: Unlike the original 2021 release featured in this article, current versions of Dangerzone do not require a separate Docker installation.

How to Use Dangerzone

The screenshots below are from the original January 2021 article. The interface has changed since then, but the basic conversion process remains similar.

1. Select a Document

Launch Dangerzone. On the first run, the application will prepare its conversion sandbox and may prompt you to download it or enable automatic sandbox updates.

Allow the sandbox to update so that its document processing tools receive security fixes.

Click on the document selection button and choose the file you want to convert.

Selecting a potentially dangerous document in the original Dangerzone interface

2. Configure the Output

Choose where you want to save the converted PDF.

You can also enable OCR and select the language of the original document. This allows Dangerzone to make text searchable and selectable in the resulting PDF.

Current versions also provide an option to move the original document into an unsafe subdirectory, reducing the chance of accidentally opening it later.

Configuring document conversion and OCR settings in Dangerzone

3. Convert the Document

Click on Convert to Safe Document to start processing.

Depending on the size and complexity of the original document, the conversion can take a while.

Dangerzone processing a document inside its conversion sandbox

4. Open the Converted PDF

Once the conversion is complete, Dangerzone can automatically open the resulting PDF in your PDF reader.

By default, converted files receive a -safe.pdf suffix.

Below you can see the result from my original 2021 test. The original document is at the top and the converted document is at the bottom.

Comparison between the original document and the sanitized PDF produced by Dangerzone

Interestingly, in that test, the converted file was more than three times larger than the original. Since Dangerzone reconstructs documents from rendered pages, the output is not necessarily smaller than the original file.

Looking for a dedicated PDF reader? Check out these open source PDF readers with dark mode support.

Limitations and Security Considerations

There are a few things to keep in mind when using Dangerzone:

  • The original document remains potentially dangerous.
  • Interactive forms, clickable links, bookmarks and embedded attachments are not preserved.
  • OCR is not always accurate, especially with unusual fonts or poor quality scans.
  • Converted files may be larger than their original counterparts.
  • Dangerzone does not protect you from deceptive information, phishing instructions or malicious QR codes visible within a document.

Dangerzone reduces the risks associated with opening untrusted documents, but no security tool can guarantee complete protection.

Keep both Dangerzone and its conversion sandbox updated, and avoid opening the original document directly unless you have a specific reason and appropriate security precautions.

More Information

Support FSMdotCOM on Liberapay