Question

Best monospace code fonts for developers?

Posted September 21, 2020 28.1k views
Development

As developers, we stare at code all day. Making sure that code is presented in a legible and clear format is table stakes for productive coding. What are some great monospaced fonts aimed at displaying code?

Criteria:

  1. Monospaced
  2. Free to use on all systems

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
10 answers

Victor Mono

This font comes with font ligatures as well as “semi-connected cursive italics”. Some developers prefer to customize their IDE’s to display comments in this cursive style as a way of differentiating the text from code.

To use this font, see Victor Mono on GitHub

Example

Victor Mono Font

License: MIT License

Inconsolata

Another free font with font ligatures designed for a great coding experience. Inconsolata is the open source alternative to Consolas listed below.

To use this font, see Incosolata on Google Fonts

Example

Inconsolata font example

License: Open Font License

DejaVu Sans Mono

This is the default font used in Debian, it’s part of a family that is an updated version of the BitStream Vera Fonts, which were used across many Open Source Linux distributions and software.

To use this font, see DejaVu Sans Mono on GitHub

License: Open Font License

Input

Input is only free for private use so you won’t be able to use it to style code blocks on your website, but it looks pretty great in your IDE.

To use this font, see Input on FontBureau

Example

input font example

License: Only free for private use, email required

Hack

Hack also comes from the same Bitstream Vera lineage as DejaVu Sans Mono. This one is built by Source Foundry and the demo page does a wonderful job explaining its benefits.

To use this font, see Hack on Source Foundry

Example

hack font example

License: MIT license

Fira Code

Fira Code is hands down my favorite, and seemed to be the favorite on the twitter conversation. It’s incredibly easy to get started with and incorporate with VS Code, my favorite editor. It’s free and includes some pretty sweet font ligatures!

To use this font, see Fira Code on GitHub

Examples

Fira Code font example

Fira Code font example

License: Open Font License

Source Code Pro

Source Code Pro was designed “to work well in user interface (UI) environments”, and the designer also created a sans-serif companion font “Source Sans.”

To use this font, see Source Code Pro on Google Fonts

Example

Source Code Pro Font Example

License: Open Font License

Ubuntu Mono

Ubuntu Mono is a monospaced typeface commissioned by Canonical (creators of Ubuntu Linux) to complement the look and feel of their Linux distribution.

To use this font, see Ubuntu Mono on Google Fonts

Example

License: Ubuntu Font License

Iosevka

I’ve seen this one listed more recently in several “Top Font” lists, so I figured it would be a good include here as well. It’s available for Windows, Mac, and Linux, so you’re good no matter what!

To use this font, see Iosevka on GitHub

Example

Iosevka Font Example

License: Open Font License

Anonymous Pro

Anonymous Pro is designed as a coding font with a few specific improvements over others in mind: Characters that could be mistaken for each other like 0 (zero) vs O (capital O) are intentionally differentiated, and the font is built to work well down to very small sizes.

To use this font, see Anonymous Pro on Google Fonts

Example

anonymous pro font

License: Open font license

Submit an Answer