A tool to generate source code QuickLook previews for macOS 10.15 Catalina and above

Latest Release: 1.2.5

 New Version


How to Use PreviewCode

Install the app and run it. This will register the availability of the app’s QuickLook extensions, Code Previewer and Code Thumbnailer. You can now quit the app — just click Quit:

The PreviewCode app UI

To use QuickLook in Finder, select a source code file and press space. This will pop up a rendered preview of the file, using a dark theme…

A dark-theme PreviewCode preview

…or a light theme…

A light-theme PreviewCode preview

…the choice is yours — make your selection in the main app’s Preferences panel.

Various PreviewCode themes

You’ll also get source code file previews in Finder’s preview pane, enabled using View > Show Preview or by hitting Cmd-Shift-P. PreviewCode enables syntax highlighted previews in the Preview: section of Finder’s file info panel (select a file and hit Cmd-I), too.

You can disable or re-enable Code Previewer and/or Code Thumbnailer in System Preferences > Extensions:

Control PreviewCode extensions in System Preferences, Extensions

Supported Languages and Data

Compiled Languages

  • ActionScript (.actionscript)
  • Ada (.ads, .adb)
  • AppleScript (.applescript)
  • Arduino (.arduino, .ino)
  • Basic (.basic, .bas)
  • Brainfuck (.brainfuck, .b, .bf)
  • C (.c, .h)
  • C++ (.cpp, .hpp)
  • C# (.csx, .cs, .c-sharp)
  • Clojure (.clojure, .clj, .cljs, .cljc)
  • CoffeeScript (.coffee)
  • Dart (.dart)
  • Elixir (.elxir, .ex, .exs)
  • Erlang (.erlang, .erl, .hrl)
  • Fortran (.for)
  • F# (.f-sharp, .fsx, .fsi, .fsscript)
  • Go (.go)
  • Haskell (.haskell, .hs, .lhs)
  • Java (.java)
  • JavaScript (.js)
  • Julia (.julia, .jl)
  • Kotlin (.kotlin, .kt, .kts, .ktm)
  • Lisp (.lisp, .lsp, .fasl)
  • Lua (.lua)
  • Objective-C (.m)
  • Pascal (.pas)
  • Perl (.perl)
  • PHP (.php)
  • Python (.py)
  • Ruby (.rb)
  • Rust (.rs, .rust)
  • Swift (.swift)
  • TypeScript (.typescript, .tsx)
  • Visual Basic Script (.vbscript, .vbs)

Shell Scripting

  • Bash (.sh)
  • C Shell (.csh)
  • Korn Shell (.ksh)
  • TCSH (.tsch)
  • Z Shell (.zsh)


  • ARM Assembler (.s)
  • x86-64 Assembler (.asm, .nasm)


  • Apple XML property lists (.plist)
  • AsciiDoc (.adoc, .asciidoc, .asc)
  • Config files (.conf, .cf, .cfg, .ini, .rc)
  • Cmake files (.cmake)
  • CSS (.css)
  • Enviroment (.env)
  • LaTex (.latex, .tex)
  • Makefiles (makefile) New
  • Protobuf (.proto)
  • SASS/SCSS (.scss, .sass)
  • SQL script (.sql)
  • Terraform source file (.tf, .terraform)
  • Terraform variable file (.tfvars)
  • Twig (.twig)

Customise the Preview

Open the Preferences panel from the main app’s PreviewCode menu, by hitting Command-,, or by clicking the Show Preview Preferences button. This Preferences panel allows you to adjust some of the key elements of the preview:

  • The preview’s font — choose from any monospace font installed on your Mac.
  • The preview’s font style.
  • The preview’s text size, from 10pt to 28pt.
  • The preview theme.

Pick your theme from the list — click on a theme or its name to select it. Use the selector above the list to view only dark or light themes, or to view all of them:

The PreviewCode app preferences theme selection

Choose your preferred text size using the slider, then pick the monospace font you want the file to be presented in:

The PreviewYaml app preferences font selection

You can also choose each font’s style:

The PreviewYaml app preferences font style selection

Click Save to apply your choices.

Changing these settings will affect previews straight away.

Feedback and Bug Reports

You can use the main app to submit feedback. Just click in the Send Feedback button in the main app, or select Report a Bug… from its Help menu:

The PreviewCode app feedback mechanism

Please include your email address if you would like a response. I can’t respond without one. Please see the privacy policy for details of email address usage.


If it appears that either Code Previewer or Code Thumbnailer are not working after you have run the host app, please log out of your Mac and then log back in.

Known Issues

  • Previews displayed on external displays, or on Macs with connected to multiple monitors, may intermittently not be scrollable if you’re using a third-party mouse. Workaround: a MacBook’s built-in trackpad will be able to scroll.
  • PreviewCode will not render Clojure .edn files. This is because the .edn file extension is pre-set on macOS to an Adobe digital rights management product. We are investigating possible workarounds.
  • PreviewCode will not render TypeScript .ts files. This is because the .ts file extension is a standard for transport stream video files. Workaround: use .tsx for TypeScript files.

Enjoyed Using PreviewCode?

If you have found PreviewCode to be useful, please consider writing a positive review on the Mac App Store, or simply give it a rating.

Thank you!


PreviewCode makes use of code from the following sources:

Source Code

You can view PreviewCode’s source code at GitHub.

Release Notes

  • 1.2.5 21 January 2023
    • Add link to PreviewText.
    • Better menu handling when panels are visible.
    • Better app exit management.
  • 1.2.4 14 December 2022
    • Add the com.microsoft.c-sharp UTI.
    • Support makefiles.
  • 1.2.3 2 October 2022
  • 1.2.2 26 August 2022
    • Initial support for non-utf8 source code file encodings.
    • Support XML Apple property list files (.plist).
    • Support the public.lua-script UTI.
  • 1.2.1 7 August 2022
    • Support the .cs C# extension.
    • Fix ARM assembly file display.
    • Fix operation of Preferences’ font style popup.
  • 1.2.0 26 April 2022
    • Update to use HighlighterSwift 1.1.0.
    • Support environment .env files.
    • Support CMake .cmake files.
    • Support Terraform variable .tfvars files.
    • Support AsciiDoc .adoc, .asciidoc and .asc files.
    • Support .conf, .cf, .cfg, .ini and .rc config files
    • Fix Haskell .hsl extension.
    • Fix x86 .nasm preview.
    • Change ActionScript supported extension to .actionscript to avoid clash with AppleSingle .as.
    • Remove Lisp .cl — clash with OpenCL source.
    • Remove Lisp .l — clash with Lex source.
    • Remove F# .fs — clash with OpenGL Fragment Shader source.
    • Remove Dylan .dylan and .lid extensions.
  • 1.1.1 19 November 2021
    • Support HashiCorp Terraform .tf files.
    • Disable selection of thumbnail tags under macOS 12 Monterey to avoid clash with system-added tags.
  • 1.1.0 28 July 2021
    • Improved font selection code.
    • Separate font style selection.
    • Accelerate loading of the Preferences panel, especially on Intel Macs.
    • Code streamlining.
    • Fixed a rare bug in the previewer error reporting code.
  • 1.0.0 17 June 2021
    • Initial public release.

Related Software

The Seal of RassilonThe Seal of Rassilon
Site and software copyright © 2023, Tony Smith