Dark Mode Extension That Works on Local Files
Patrick Bushe · May 1, 2026
Chrome blocks extensions from local files until you allow it, which is why most dark themes seem to skip them.
For Modern Dark Mode, go to chrome://extensions, click Details under Modern Dark Mode and turn on "Allow access to file URLs". After that, local HTML, text and JSON files you open in Chrome are darkened like any web page. PDFs are the exception: they open in Chrome's built-in PDF viewer, where extensions can't run. The extension doesn't read or send anything from your files; it only adds a style to the page.
Related Answers
More guides on similar topics
Best Dark Mode for Reading Code Documentation Online
Modern Dark Mode darkens docs pages and keeps code colors' hues roughly intact. Docs with their own dark theme, like MDN, are better left to it.
best free system-wide dark mode extension for chromeBest Free System-Wide Dark Mode Extension for Chrome
Modern Dark Mode is free, darkens every site in Chrome and collects no data. A truly system-wide dark mode is a Windows or macOS setting.
chrome dark mode extension with no performance hitChrome Dark Mode Extension with No Performance Hit
Modern Dark Mode uses one CSS filter instead of rewriting each page's styles, so it does very little script work. No extension costs nothing.
dark mode for online textbooks in google chromeDark Mode for Online Textbooks in Google Chrome
Modern Dark Mode darkens most web-based textbook readers. Pages drawn on a canvas, in a frame or as PDFs may stay white.
dark mode for websites that ignore system preferencesDark Mode for Websites That Ignore System Preferences
Modern Dark Mode puts a color-flipping filter on any page, including sites that ignore your dark setting. Exclude sites that are already dark.
detect midjourney images from metadataDetect Midjourney Images From Metadata
What metadata Midjourney images may carry, how to read it, why it's often missing, and other ways to tell if an image came from Midjourney.