Quick Look for code

Quick Look for code on Mac. JSON, YAML and Python, in color.

Press Space on a config file in Finder and macOS shows gray text. With TypeFire installed, the same keypress shows JSON, YAML, scripts, source code and logs in color, with line numbers and a bar that names the language. Free, and built in.
A package.json file selected in Finder and previewed with Quick Look in color, with line numbers and a TypeFire Preview bar showing JSON, the edit date and 10 lines

How do I preview JSON or YAML with syntax highlighting in Finder?

macOS previews code and config files as plain text. Install a Quick Look extension that colors them, select the file and press Space. TypeFire 7.1 includes one, free: JSON, YAML, TOML, .env, shell scripts, logs and dozens more types preview in color with line numbers.

Markdown files preview rendered, as they already did. Turn the code preview off any time in Settings, Files & Preview, Preview code and data files.

Space, and it is in color

Select a config, a script or a log in Finder and press Space. Keys, strings, numbers and comments each get their own color, with line numbers down the side.

Built in

The previewer comes inside TypeFire. There is no plugin to download, nothing to approve in System Settings and no Terminal command.

Light or dark, like the app

The preview uses TypeFire's own light or dark look, so a file looks the same on Space as it does when you open it.

Data and config

The files that run everything, readable on Space.

Most of what decides how an app or a server behaves lives in small text files. A preview in color is the fastest way to check one.

  • JSON, JSONC and JSON5

    A package.json, an API response you saved or a settings file reads as structure instead of a wall of quotes and braces.

    .json.jsonc.json5
  • YAML, TOML and the rest of your config

    Deployment files, CI pipelines and app settings preview with their keys, values and comments apart.

    .yaml.yml.toml.ini.conf.cfg.env.properties
  • Logs, diffs and patches

    Read a server log or check a patch before you apply it, with line numbers so you can say exactly where something happened.

    .log.diff.patch
Quick Look showing a JSON file in color with line numbers beside a Finder list of .env, config.yaml, deploy.sh and server.log
Source code and scripts

Read the code before you open the project.

Arrow through a folder with the preview open and each file is colored as you land on it.

  • Web code

    Stylesheets, scripts and components from any project preview in color.

    .js.mjs.cjs.jsx.tsx.css.scss.less.vue.svelte.graphql
  • Programming languages

    About twenty languages, from Python and Go to Swift and SQL.

    .py.rb.go.rs.java.kt.swift.c.cpp.cs.php.lua.pl.sql.proto.gradle
  • Shell scripts

    Check what a script does before you run it, without opening an editor or a Terminal window.

    .sh.bash.zsh.fish
A config.yaml file open in a TypeFire tab beside a note, with Find, Focus mode, Wrap lines and Line numbers, and a menu with Copy text, Copy file path, Open in TextEdit, Open in a new window and Show in Finder
More than a preview

Look on Space. Edit on double click.

The preview tells you what the file is. When it is the one you wanted, TypeFire opens it as code in a tab beside your notes.

  • The language, the date and the size

    A TypeFire Preview bar along the bottom names the language, says when the file was last edited and counts its lines.

  • Double click to edit

    TypeFire opens the same file in a tab beside your notes, in color, with Find, Wrap lines and line numbers, and saves it exactly as it was.

  • Your default apps stay yours

    Previewing changes nothing about which app opens a file. To open code in TypeFire on a double click, turn on Open in TypeFire for a type or a group in Settings, Files & Preview. It asks first.

Compared

TypeFire against the Mac's own preview

What you see when you press Space on a config file, with and without TypeFire.

 TypeFirethe Mac's own preview
Colors by languageYesNo, plain text
Line numbersYesNo
Language, edit date and line countIn the TypeFire Preview barNo
Light and darkTypeFire's own lookSystem text view
Edit on double clickIn TypeFire, saved exactly as it wasWhatever app owns the type
PriceFreeBuilt in

Quick Look for code: questions

Still not answered?

Install TypeFire, select the .json file in Finder and press Space.

Quick Look shows it in color with line numbers instead of plain gray text, along with a bar naming the language, when it was last edited and how many lines it has. JSONC and JSON5 preview the same way. It's free.

Yes, with TypeFire 7.1. YAML (.yaml and .yml), TOML, INI, .conf, .cfg, .env and .properties files preview in color in Finder, so keys, values and comments are easy to tell apart.

JSON, JSONC, JSON5, YAML, TOML, INI, .conf, .env and .properties; CSS, Sass and Less; JavaScript (.js, .mjs, .cjs, .jsx), TSX, Vue, Svelte and GraphQL; Python, Ruby, Go, Rust, Java, Kotlin, Swift, C, C++, C#, PHP, Lua, Perl, SQL, Protocol Buffers and Gradle; shell scripts (sh, bash, zsh, fish); logs, diffs and patches.

Markdown files preview rendered, as they always have.

macOS draws CSV and TSV files in Quick Look itself, so pressing Space shows the Mac's own preview.

To work with one as a table, open it in TypeFire with File > Open or Open With: it opens as a table you can edit, and saving rewrites only the rows you changed.

Yes. Select a .log file and press Space to read it with line numbers, in TypeFire's light or dark look.

Diffs and .patch files preview the same way, so a change is readable before you open anything.

No. macOS keeps its own preview for .txt and .xml files (and for CSV), and it treats .ts as a video type, so TypeFire leaves those alone.

You can still open all three in TypeFire's editor from File > Open.

No. Previewing changes nothing about which app opens a file.

If you want TypeFire to open them on a double click, turn on Open in TypeFire in Settings > Files & Preview, for one type or a whole group. TypeFire first names the types and the apps they come from, and turning the switch off later hands each type back.

Open TypeFire's Settings, then Files & Preview, and turn off the Quick Look switch for Data and logs, Web code or Code and scripts.

Finder goes back to the Mac's own plain preview for those files.

Then TypeFire leaves it alone. Its preview for that group starts off, and the group's row in Settings > Files & Preview names the other app.

Turn the group's Quick Look switch on when you want TypeFire's colored preview instead.

Yes. It's part of the free app, not Pro, and runs on Intel and Apple silicon Macs with macOS 13 or later.

Yes. Run brew install --cask navbuildz/typefire/typefire in Terminal.

It installs the same signed app as the download, for macOS 13 or later on Apple silicon and Intel, and TypeFire keeps itself up to date from then on. To remove it, run brew uninstall --cask typefire.

In their words

Loved by people who type all day.

Unprompted reactions from users, in their own words.

Exactly what macOS has been needing: blazing fast, beautifully designed, and it respects your privacy without forcing a subscription.
Physician
I use TypeFire every single day, all day long. I love it.
Works at Apple
The way you've handled the AI integrations is very elegant. A great implementation.
Mac user
TypeFire is the absolute replacement for TextExpander.
Works at Apple
I love your app. Love it. The only one that does what I want it to do.
Mac user
I'm loving the date math. Amazing, love it.
ICU doctor
It instantly imported my 502 snippets. Flawless import.
Moved over from TextExpander
Incredibly lightweight. It has quickly become a go-to tool in my daily workflow.
Physician
Love the app, and your development pace rocks.
Longtime user
This app is AWESOME! And I definitely want to buy the Pro version.
Free user
Fantastic. Thank you for the very fast fix.
EU keyboard user
This app has so much potential. I'm really grateful that I found it.
Mac user

Used by people at

AppleRed HatPalo Alto NetworksHubSpotIndeedSentryFreshworksTrustpilotBumbleFarfetchSaint-GobainfoodpandaMcKinseyAccentureIntuitInstacartRakutenDow JonesHearstRokuxAINuroGitGuardianMeltwaterDevRevWoltAirwallex

Company names are places where our users work. They do not imply endorsement or affiliation.