Monospace programming fonts for code editors

Open-license fixed-width families for terminals and code editors, with clear zeros, several weights and, for most, italic styles.

12 open-license familiesUpdated

const x = 0;

Set in JetBrains Mono. Select “Show it here” on any font below to set this line in it.

You stare at a code font all day, so small details matter more than they would anywhere else. Start with the characters that must never be mixed up. Zero next to capital O, the digit one next to lowercase l and capital I, round brackets next to curly braces: at 12 or 13 pixels each of these should be impossible to misread. That is why so many coding fonts put a dot or a slash inside the zero.

Next comes texture and range. Every glyph has to fill the same width, so slim letters like i and l get long serifs or tails to occupy their cell, and the way each designer solves this sets the font’s overall feel. Syntax highlighting needs at least a regular and a bold, and a real italic is handy for comments. On high-density screens the light weights usually look better, on older monitors the heavier ones. Some fonts include programming ligatures, which join sequences such as an arrow into a single symbol. Some people love them and some do not, and editors let you turn them off. Finally, check the width, because a narrower font fits more columns into a split pane.

  1. JetBrains Mono

    Built for writing and reading code, with a tailed l, serifs on the capital I and a marked zero; eight weights plus italics.

    Monospace 16 styles, variable OFL Try JetBrains Mono

  2. Roboto Mono

    Its punctuation is adjusted for source code, across seven weights that each have an italic.

    Monospace 14 styles, variable OFL Try Roboto Mono

  3. Inconsolata

    Originally made for code printed on paper, it has a slashed zero; today it varies in width and weight, with no italics.

    Monospace 8 styles, variable OFL Try Inconsolata

  4. IBM Plex Mono

    Feet like slabs on i, l and r, plus a marked zero, stop similar characters from blending; seven weights plus italics and Cyrillic.

    Monospace 14 styles OFL Try IBM Plex Mono

  5. Source Code Pro

    Partner for coding to a sans made for interfaces; variable between ExtraLight and Black, with italics.

    Monospace 16 styles, variable OFL Try Source Code Pro

  6. Fira Code

    Programming ligatures turn frequent operator sequences, arrows among them, into one symbol each.

    Monospace 5 styles, variable OFL Try Fira Code

  7. Geist Mono

    Look-alikes are kept apart by a curved foot on the l, a flat base on the i and a slashed zero; nine weights plus italics, with Cyrillic.

    Monospace 18 styles, variable OFL Try Geist Mono

  8. Cascadia Code

    Beyond Latin it covers Greek, Cyrillic, Hebrew and Arabic; six weights, each with an italic.

    Monospace 12 styles, variable OFL Try Cascadia Code

  9. DM Mono

    Three weights with italics, a tailed l and a slashed zero; the heaviest weight is Medium, so highlighting gets no real bold.

    Monospace 6 styles OFL Try DM Mono

  10. Ubuntu Mono

    Made for code and terminals in Regular and Bold, both with true italics.

    Monospace 4 styles UFL Try Ubuntu Mono

  11. Anonymous Pro

    A set of four fonts made for programming, in which 0, O, 1, l and I are clearly distinct.

    Monospace 4 styles OFL Try Anonymous Pro

  12. Atkinson Hyperlegible Mono

    In seven weights plus italics, drawn to make 0, O, 1, l and I easy to distinguish.

    Monospace 14 styles, variable OFL Try Atkinson Hyperlegible Mono

Samples load a basic Latin subset of each family. Every family here carries an open license; its page states the terms and offers the original files.

Questions about monospace programming fonts for code editors

Do any of these coding fonts include programming ligatures?

A note mentions ligatures only when the font’s record lists them. If you would rather see plain characters, most editors have an option to turn font ligatures off.

What are the steps to install a coding font in my editor?

Download the family and install its files in your operating system. Then type the family name into the font setting of your editor or terminal, and restart the app if it does not pick the name up straight away.

Can I show these fonts in a paid course or ship them in a commercial product?

Yes. Their open licenses allow commercial use, which covers screenshots, videos and embedding in software. Each font page names its license.

Should I set body text in a monospace font?

It is fine for a short passage but not for long reading, because equal widths make words harder to tell apart. Pair the monospace with a proportional family for prose.