Processed on-device · pdf.js + pdf-lib

Invert PDF Colors Online — dark mode for reading, lighter backgrounds for printing

Invert the colors of a PDF in your browser. Turn light pages dark for low-light reading, or convert dark-background pages to lighter versions for printing.

See the four steps
Full color invert Page range Live preview toggle PDF stays in your browser
Built & maintained by Bhavin J. Sheth | Updated

The inversion console

Upload a PDF, choose the render quality and page range, then create an inverted-color version.

Drop your PDF here

or browse files

If your PDF is password-protected, enter the PDF password first, then upload the file here. We do not store your PDF password.

How inversion actually works

Inversion flips every pixel, not just the theme

This isn't a CSS dark-mode filter applied at view time — it's a permanent negative of the page baked into a new file, the same way a photographic negative reverses a print.

A negative, made permanently

The tool renders each PDF page in your browser, applies a color-inversion blend to the rendered image, and rebuilds the selected pages into a new PDF.

Each page is rendered to a canvas in the browser, then a difference blend against white is used to create the inverted appearance. The rendered result is then embedded as an image in a new PDF so the inverted appearance is baked into the generated PDF and does not depend on a viewer's dark-mode support.

Every control and what it changes

Full invert

Flips the rendered page colors — black to white and other colors toward their negative values. It is the only inversion mode because applying one consistent transformation is more predictable across different PDF layouts.

Page range

Leave blank to invert every page, or set Start and End to invert only that range. Pages outside the range are kept visually unchanged, but the output PDF is rebuilt as page images.

Live preview

A CSS filter toggle on the thumbnails shows roughly how the invert will look before you commit to processing.

Render quality

Low renders pages at a lower scale for smaller output. Medium provides a balance between clarity and file size. High uses the highest render scale available in this tool for more detailed output, which can increase processing time and file size.

Password support

Enter a password directly in the upload area to open and invert an encrypted PDF.

How to invert a PDF in four steps

Upload your PDF, choose the page range and render quality, then review and download the result.

1

Upload your PDF

Drag it onto the upload area, or click Select PDF. If it's password-protected, enter the password in the field provided.

Page previews are generated in your browser as the PDF loads.
2

Set page range and render quality

Choose which pages to invert and how detailed the rendered output should be:

Page range: leave blank for all pages, or enter a start/end.
Render quality: Low, Medium, or High.
Live preview: toggle on to check the look on thumbnails first.
3

Invert

Click Invert PDF Colors. The document is processed page by page according to your settings.

Everything happens in this tab — no upload, no queue.
4

Check and download

Review the inverted PDF, rename it, and download it to your device.

Page-by-page preview Nothing uploaded

PDF color inversion: before and after

A full invert on a text-heavy page — the rendered page colors are inverted throughout.

Original Bright white
Original PDF with white background and black text before color inversion

Standard white background — bright for low-light reading, while dark-background pages can require more ink when printed.

Inverted
Inverted High contrast
Inverted PDF with black background and white text after color inversion

Dark background, light text — a darker reading view for low-light use. For printing, results depend on the original page colors and the document content.

Documents better read (or printed) in negative

Cases where flipping every color can help with reading, printing, or accessibility preferences.

Common situations for inverting PDF colors, by user type
SituationWhat gets invertedTypical user
Night readingTurn e-books and articles into a dark background for comfortable low-light reading.Students & readers
Light sensitivityProvide a darker reading option for documents that feel too bright in low-light environments.Readers who prefer lower screen brightness
Printing dark-background PDFsFlip a dark-background presentation or document to a lighter version before printing.Offices & print shops
Design proofingCreate negative proofs from photo albums or portfolio PDFs.Photographers & designers
Blueprints & CADInvert technical drawings when a negative-style view is easier to inspect on screen.Engineers & architects
Academic studyCreate dark-mode versions of research papers for late-night study sessions.Researchers & students
Slide decksFlip dark-themed slide exports to a lighter version for handouts.Presenters & trainers
Color reviewInvert mockups to check color composition and contrast at a glance.Graphic designers
Settings explained

What each control actually changes

Four controls total — here's exactly what each one does to the final file.

Full invert

Flips the rendered page colors — black to white and other colors toward their negative values. It is the only inversion mode because applying one consistent transformation is more predictable across different PDF layouts.

Page range

Leave blank to invert every page, or set Start and End to invert only that range. Pages outside the range are kept visually unchanged, but the output PDF is rebuilt as page images.

Render quality

Low renders pages at a lower scale for smaller output. Medium provides a balance between clarity and file size. High uses the highest render scale available in this tool for more detailed output, which can increase processing time and file size.

Live preview

Toggles a CSS filter on the thumbnails so you can see roughly how the inversion will look before waiting for the full render — a quick sanity check, not the final output itself.

When the inverted file isn't what you expected

Common problems, why they happen, and what you can try next.

Symptom
Why it happens
Fix

Password-protected PDF won't load

The password field was left empty, or the wrong password was entered.

Type the correct password into the password field, then upload again.

"Invalid page range" alert

Start is greater than End, or a number falls outside the document's page count.

Enter a range where Start ≤ End and both are within the total page count.

Output looks blurry

Render Quality was set to Low.

Switch to Medium or High for crisper text and images.

Text isn't selectable in the output

Inversion converts each page to an image to guarantee a correct visual result.

Expected — the output is built for viewing and printing, not for text selection.

File size is too large

High quality on a long document produces a large output.

Switch to Low or Medium, or invert only the page range you actually need.

Processing is slow

A large PDF at High quality uses significant browser memory to render.

Close other tabs for headroom, or use Medium quality for faster processing.

Photos look strange after inverting

Full invert flips all colors, including photographs — this produces the classic "negative" look.

Expected behavior — for photo-heavy documents, use the page range to invert only the text pages.

Password-protected PDF won't load

Why: Wrong or missing password.

Fix: Enter the correct password, re-upload.

"Invalid page range" alert

Why: Start > End or out of range.

Fix: Enter a valid Start ≤ End.

Output looks blurry

Why: Quality set to Low.

Fix: Switch to Medium or High.

Text not selectable

Why: Pages become images.

Fix: Expected — built for viewing/printing.

File is too large

Why: High quality, many pages.

Fix: Lower quality or use a page range.

Processing is slow

Why: Large PDF at High quality.

Fix: Close tabs, or use Medium quality.

Photos look strange

Why: All colors get inverted.

Fix: Use a page range for text-only pages.

Tips for a cleaner PDF inversion

A working order that avoids the most common redo.

Start with Medium quality

It's the right balance of file size and clarity for most documents — only move to High for print-ready output or Low for quick email sharing.

Check Live Preview first

Toggle it on to see roughly how the inversion looks on the thumbnails before waiting for the full render.

Use a page range for mixed content

If a document has both text and photo pages, invert only the text pages so images keep their original look.

Keep the original file

Because the output is rebuilt from rendered page images, keep the source PDF so you can create another version with different settings later.

Test one page on a large document

For a large document, test a representative page first to check the appearance and render quality before processing the whole file.

Rename before downloading

A clear name like "report_dark-mode.pdf" makes the inverted file easy to identify later.

PDF color inversion questions

If something's not covered here, the troubleshooting section above likely has it.

Are my PDF files uploaded to a server?

No. This tool processes the PDF locally in your browser, so the file is not uploaded to an AllInOneTools processing server.

Will I be able to select and copy text from the inverted PDF?

No. The output is rebuilt from rendered page images, so the original PDF text layer is not preserved. The result is designed for visual reading and printing rather than text selection or editing.

Why is Full Invert the only mode available?

Reliably isolating and inverting only text or selected colors can be difficult with complex PDFs in a browser. Full Invert applies the same visual transformation to the rendered page, which keeps the behavior consistent across different document layouts.

How does the Render Quality setting work?

Low renders pages at a lower scale for smaller output. Medium provides a balance between clarity and file size. High uses the highest render scale available in this tool for more detailed output, which can increase processing time and file size.

Does this work on scanned PDFs and image-only files?

Yes. Because the page is inverted visually after rendering, scanned and image-only PDFs can be processed in the same way as text-based PDFs.

Build notes

The write-up on how this was built

Because rendering, the difference-blend inversion, and re-encoding all run client-side, I wrote up the implementation — why a canvas blend mode produces a truer negative than a simple CSS filter, and how the result gets baked back into a real PDF.

Published on freeCodeCamp

How to Build a PDF Color Inverter Using JavaScript

Covers canvas-based color manipulation, rendering PDF pages to images, and client-side processing that keeps files private on the user's device.

Read the write-up on freeCodeCamp

Written by Bhavin Sheth · Founder, AllInOneTools