Space-bar any source file in Finder and see it colourised. A Quick Look preview extension built on the app-extension API, now that Apple has retired the .qlgenerator plugins the old tools relied on.
Learn about QLCodePreview's development at briangilbert.net ↗
The highlighter is built from scratch and runs inside the sandboxed extension. Nothing to install alongside it.
A 2 MB file previews in about 130 ms: keyword lookup is a set scan, and each colour crosses the wire once as a CSS class, not once per token.
Font and size, light and dark themes, line numbers, soft-wrap, tab width, and a max file size past which it won't render.
Map any file extension to a language in settings; install → php is the canonical example. The Drupal filetypes that started this whole thing in 2012 are a settings tab now, not a fork.
Source, config, markup: dozens of languages, and anything unknown falls back to plain text.
Unknown extensions fall back to plain text, and any extension can be remapped in the app's Custom File Types pane.
The easy way is Homebrew: brew trust konstruukt-labs/tap (one-time; current Homebrew requires it for third-party taps), then brew install --cask konstruukt-labs/tap/qlcodepreview. Or grab the latest notarised build from GitHub ↗. It's a universal zip (arm64 + Intel), built and tested on Apple Silicon. Building from source works too: ./build.sh install needs nothing but Apple's Command Line Tools, no Xcode.
Run QLCodePreview once (the toggle only appears after the app has been run), then System Settings → General → Login Items & Extensions → Extensions → QLCodePreview = ON. The one step macOS won't let a script do.
Any source file in Finder, colourised on the spot.
The app is free, but making it isn't: Apple Developer Program membership and everything hosted around the app cost real money. If QLCodePreview earns its keep on your Mac, there's a coffee link in the app's footer, or the buttons right here.




