Tips・Use VS Code faster

Recommended fonts for coding

The "font for writing code" you use in an editor is a different thing from fonts for web pages. From how easy 0 and O are to tell apart, to ligatures that make arrows look sharp, to how Japanese comments look — here are 17, by type, with samples.

VSCode comes with a readable font from the start, but the longer you spend writing code, the more the difference between fonts matters. How easy 0 (zero) and O (oh) are to tell apart, how easy l (ell), 1 (one), and I (eye) are to tell apart, the “ligatures” that turn a symbol like => into a single connected arrow, and even how Japanese comments look — fonts made for coding are designed with nothing but reading and writing code in mind. Here are free recommendations, by type, with samples.

TipsChange the face of your text with Google FontsThose are fonts for the text displayed on a web page. What this article introduces are fonts for you to write code with in an editor

How to change the font in VSCode

  1. Open Settings with ⌘, (on Windows, Ctrl+,)
  2. Type “Font Family” in the search field
  3. In the field that appears, enter the font name (leaving monospace at the end, like 'Fira Code', monospace, serves as a fallback when loading fails)

If you write it directly in settings.json, it’s these two lines. For fonts that use ligatures, also turn on fontLigatures.

{
  "editor.fontFamily": "'Fira Code', monospace",
  "editor.fontLigatures": true
}

How to install a font

Unlike web fonts, fonts used in an editor need to be installed on the computer itself. That said, the steps are simple.

  1. Download it — for those distributed on Google Fonts, get the zip from the font page via “Get font” → “Download all”; for those distributed on GitHub (like PlemolJP and UDEV Gothic), from the repository’s Releases page
  2. Unzip it and double-click the .ttf (or .otf) file inside
  3. On the screen that opens, press “Install” (on Mac, Font Book opens; on Windows, a preview screen opens)

Once installed, restart VSCode. Now you can specify it as the font name in your settings.

Good compatibility with Japanese (matching typeface all the way to comments)

Latin-only fonts have their typeface change completely the moment you hit a Japanese comment. The five introduced here carry Japanese characters themselves, so Latin and Japanese align in the same typeface.

Source Han Code JP

The original of Japanese coding fonts, made by Adobe. It combines the Latin Source Code Pro with the Japanese Source Han Sans (same design as Noto Sans CJK). When in doubt, this one. Updates stopped in 2020, but since it’s a finished typeface there’s no practical problem. If you’d prefer something actively updated, go with PlemolJP or UDEV Gothic below.

A sample of the same code and a Japanese comment displayed in Adobe’s refined Japanese coding font
Both Latin and Japanese are crafted with Adobe’s design expertise, so you can use it with confidence. Its reliability as a corporate product is a draw too.

Source Han Code JP

PlemolJP

A popular font, actively updated, that combines IBM Plex Mono and IBM Plex Sans JP. Its half-width to full-width ratio of 1 to 2 makes it easy to align things with tabs.

A sample of the same code and a Japanese comment displayed in an IBM Plex-based Japanese coding font
Since it shares lineage with IBM Plex Mono, switching over from the Latin-only IBM Plex Mono feels seamless.

PlemolJP

Moralerspace Neon

A relatively new Japanese coding font that combines Monaspace with a Japanese font. With “texture healing” inherited from Monaspace, it also balances out tight character spacing.

A sample of the same code and a Japanese comment displayed in a new Monaspace-based Japanese coding font
It keeps the feel of Monaspace Neon, and Japanese comments blend in naturally too.

Moralerspace

UDEV Gothic 35NF

A popular Japanese coding font that combines JetBrains Mono-based Latin with BIZ UDGothic-based Japanese. The “35” expresses the character-width ratio of half-width 3 to full-width 5 (the standard version is 1:2).

A sample of a coding font where both the Latin code and the Japanese comment are unified in the same typeface
Both the Latin code and Japanese comments line up seamlessly in the same typeface. Recommended for those who use Japanese comments a lot.

UDEV Gothic

HackGen35

A font combining the staple coding font “Hack” with the Japanese gothic “GenJyuu Gothic.” Another popular pick, by the same author as UDEV Gothic.

A sample of a somewhat rounded coding font where both the Latin code and the Japanese comment are unified in the same typeface
A slightly softer impression than UDEV Gothic. If you can’t settle on a single Japanese-supporting font, it’s also nice to install a few and compare them side by side.

HackGen

Staple / readability-first

Classic coding fonts with little decoration. Made with an emphasis on not tiring you out even after reading code for long stretches.

JetBrains Mono

A font JetBrains designed with the goal of “reducing the strain on developers’ eyes.” Its characters are uniform in height, so lines are less likely to feel cramped and hard to read.

A sample where the code “const arrow = (a, b) => a !== b;” is displayed in a crisp, readable coding font, with the arrow symbol turned into a single connected shape
A sample with ligatures, where => and !== become single connected symbols. When in doubt, this one first.

JetBrains Mono

Source Code Pro

A classic coding font made by Adobe. It has no quirks and fits any editor or theme.

A sample of the same code displayed in an orthodox coding font without ligatures
The most orthodox type, where symbols display as symbols. For those who want stability.

Source Code Pro

Cascadia Code

Made by Microsoft and bundled by default with Windows Terminal and Visual Studio. If you use Windows Terminal, you may already have it on hand. It isn’t bundled with VSCode, so you’ll need to install it to use it.

A sample of the same code and a Japanese comment displayed in Microsoft’s refined coding font
It has arrow ligatures too — a versatile type you can use as a staple or to add personality, either way.

Cascadia Code

Roboto Mono

The monospace version of the Roboto family, made by Google. Familiar around Android and Chrome, with a straight, strong impression.

A sample of the same code displayed in a coding font with a straight, strong impression
Another safe bet that fits any OS or editor without feeling out of place.

Roboto Mono

Inconsolata

A slim, elegant, minimal type long loved in the coding-font scene.

A sample of the same code displayed in a slim, elegant, minimal coding font
Since the characters are clean and thin, it suits people who want to fit a lot of code on the screen.

Inconsolata

Ligatures make symbols look sharp

Ligatures are the feature where multiple symbols like => or !== merge into a single connected shape. The meaning of the code comes across at a glance through the shape of the symbol.

Fira Code

The one that sparked the ligature coding-font trend. Its arrow and equals ligatures have very natural shapes.

A sample of the same code displayed in a coding font where arrow ligatures appear smoothly
A staple that took off thanks to the high quality of its ligatures. When in doubt, you could even pick between just this and JetBrains Mono.

Fira Code

Victor Mono

Its biggest distinction, on top of ligatures, is being able to display comment sections in a cursive-like italic.

A sample of a coding font where only the comment section of the same code is displayed in a cursive-like italic, while the Japanese comment stays in the regular typeface without italics
Only the Latin comments turn into a flowing italic, so the boundary between code and explanation is clear at a glance. The Japanese parts don’t become italic, due to the nature of the typeface.

Victor Mono

Want a bit of personality

A type that keeps readability while having character in the shapes of the letters. Your mood lifts every time you open the editor.

IBM Plex Mono

The monospace version of IBM’s brand font family. Its corners are soft, giving a modern, elegant impression.

A sample of the same code displayed in a coding font with a soft-cornered, modern impression
A clean, business-like feel. It fits an editor used for work too.

IBM Plex Mono

Space Mono

A retro, rugged monospace font like a typewriter. Its angular brackets and quirky letterforms are its strong points.

A sample of the same code displayed in a typewriter-style, retro-impression coding font
Its quirky shapes are exactly what make it distinctive. Recommended for those who like a terminal-ish look.

Space Mono

Monaspace Neon

A relatively new coding-font family developed by GitHub. It’s characterized by a mechanism called “texture healing” that mixes five typefaces, and Neon is the mainstay type among them with the fewest quirks.

A sample of the same code and a Japanese comment displayed in GitHub’s new coding font
A modern font with a well-considered balance of character weight. For those who want a look with a slightly different flavor from the rest.

Monaspace

Iosevka

A surprisingly slim, tall coding font. It offers a wide range of customization, and it’s a family that many people tweak to their own preferred weight and width.

A sample of the same code and a Japanese comment displayed in a thin, tall coding font
For those who want to increase the number of characters that fit on one line. Being slim, it doesn’t feel cramped even when you line up lots of code.

Iosevka

Anonymous Pro

As the name suggests, a monospace font with a plain, anonymous look. It has the unadorned feel of an old-fashioned terminal.

A sample of the same code displayed in a plain, old-fashioned terminal-style coding font
Practicality over flashiness. There’s reassurance in how long it’s been in use.

Anonymous Pro

Points to check when choosing

On top of which look you prefer, comparing these four helps you find the one font that suits you.

CheckWhat to look at
Confusing charactersCan you tell 0 and O, 1, l, and I apart at a glance?
LigaturesDo you want ligatures for arrows and such, or do you prefer symbols to stay as symbols?
Japanese commentsDo you want to match the typeface all the way to Japanese?
Character widthIf you want to fit lots on one line, a slim type like Iosevka

Summary

  1. A coding font is a different thing from a font for web pages. It’s made with nothing but reading and writing code in mind—things like how easy 0 and O are to tell apart
  2. When in doubt, the staple JetBrains Mono; if you want to enjoy symbol ligatures, Fira Code; if you want to match the typeface all the way to Japanese comments, Source Han Code JP
  3. The VSCode setting is just one line, editor.fontFamily. For fonts that use ligatures, don’t forget editor.fontLigatures too

FAQ

Are coding fonts free to use?
The 17 introduced here are all open-source fonts that are free and can be used commercially. You can download and install them with peace of mind.
Can I use them when writing Japanese comments too?
Even with a Latin-only font, VSCode automatically switches the Japanese parts to display in the system's Japanese font, so the display won't break if you use it as-is. If you want the Latin and Japanese typefaces to match exactly, choosing a Japanese coding font like Source Han Code JP, introduced under "Good compatibility with Japanese" in the article, unifies even the comments in the same typeface.
What if I'm not a fan of ligatures?
Set editor.fontLigatures to false in the settings and even a ligature-capable font shows symbols one character at a time. You could also choose Source Code Pro or Roboto Mono, which don't have ligatures to begin with.