PDF dark mode in Firefox: what works, what doesn't

Firefox happily darkens its own interface — but PDF pages stay stubbornly white. Here's the honest lay of the land, and a fix that survives every update.

What Firefox's built-in PDF viewer can do

Firefox opens PDFs with its own built-in viewer (pdf.js). If you use a dark Firefox theme, the viewer cooperates: toolbar, sidebar and menus all go dark. It looks promising — until you notice the document itself is still a bright white rectangle in the middle of your dark browser.

That's the whole story: the viewer has no setting to recolor page content. Dark theme or not, pages render exactly as the file was authored.

Is there an about:config trick?

No — and it's worth saying plainly, because forum threads love to invent one. Firefox exposes a handful of pdfjs.* preferences in about:config, but they control the sidebar, annotation editing and rendering internals. None of them inverts or recolors the page. If a blog post shows you a magic flag for dark PDF pages, it's guessing.

What about extensions?

Extensions like Dark Reader do an excellent job on ordinary web pages — but Firefox does not allow extensions to restyle the built-in PDF viewer, so they stop at the document's edge. Some PDF-specific extensions take the opposite route: they replace the viewer with their own. That can work, but you're trading Firefox's viewer for a third-party one, with its own feature set and its own access to your documents.

There's also the operating-system route — Windows high contrast or macOS Smart Invert. These do invert the PDF pages, along with everything else on your screen: every app, every photo, every video, all turned into a color negative. For a quick look it's fine; for nightly reading it wears thin fast.

Send PDFs to a reader that has dark mode

One legitimate option is to stop opening PDFs in the browser at all. In Firefox, go to Settings → General → Applications, find Portable Document Format (PDF), and choose another action — then open files in a desktop reader with a dark page view, like Sumatra (press i) or Okular. Our reader comparison covers what each of them really does.

The catch: those readers invert the view, not the file — usually as harsh white-on-black, with photos turned negative, and nothing you can save or send to your tablet.

The file-level fix: convert the document

The option that keeps working no matter what Firefox does next is to convert the PDF itself. The dark theme is written into the document, so Firefox's plain built-in viewer shows it dark — no flags, no extensions, no OS hacks. And the same file opens dark on your phone, your tablet, and anywhere else you send it.

Try it with a document you're reading tonight:

Drop your PDF here
or click to browse — the file never leaves your device

100% private — your file is processed locally in your browser and never uploaded.

Frequently asked questions

Does Firefox have a dark mode for PDFs?

Only for the interface. With a dark Firefox theme, the built-in PDF viewer's toolbar and menus go dark — but the document pages always render as authored, black text on white. There is no setting in the viewer to recolor the pages themselves.

Is there an about:config setting for dark PDF pages in Firefox?

No. Firefox's pdf.js preferences in about:config control things like the sidebar and rendering, but none of them inverts or recolors page content. Blog posts claiming a magic flag for dark PDF pages are guessing.

Can a Firefox extension dark-mode the built-in PDF viewer?

Not directly. Extensions are not allowed to restyle Firefox's built-in PDF viewer. Invert-everything extensions work on normal web pages but stop at the PDF viewer; some PDF-specific extensions replace the viewer entirely with their own, which is a trade-off in features and privacy.

Will a converted dark PDF stay dark in Firefox?

Yes. A converted file has the dark theme written into the document itself, so Firefox's viewer displays it dark like any other content — no theme, extension, or setting required. It also stays dark when you download, print, or open it in another app.