Prompts
EN

Monospace fonts for coding

Fixed-width open-license families for editors and terminals, with clear zeros, several weights and, in most cases, italics.

16 open-license familiesUpdated

const x = 0;

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

A programming font is something you look at for hours, so small differences add up. The first requirement is that characters which mean different things look different. Zero against capital O, the digit one against lowercase l and capital I, and the pairs of brackets and braces should all be unmistakable at 12 or 13 pixels. Many coding fonts mark the zero with a slash or a dot for exactly this reason.

After that it is a matter of rhythm and range. Because every character has the same width, narrow letters such as i and l get wide serifs or tails to fill their cell, and how a designer handles that gives each font its texture. A regular and a bold are the minimum for syntax highlighting; a true italic is useful for comments. Lighter weights tend to look better on high-density displays, heavier ones on older monitors. Some fonts add programming ligatures, which draw sequences such as an arrow as one symbol; whether that helps is a personal call, and editors let you switch it off. Check the width too: a narrower design shows more columns in a split view.

  1. JetBrains Mono

    Made for reading and writing code: a marked zero, a serifed capital I and a tailed l, in eight weights with italics.

    Monospace 16 styles · variable OFL Try JetBrains Mono

  2. Roboto Mono

    Seven weights with italics and punctuation tuned for source code.

    Monospace 14 styles · variable OFL Try Roboto Mono

  3. Inconsolata

    First drawn for printed code listings, with a slashed zero; now variable in weight and width, upright only.

    Monospace 8 styles · variable OFL Try Inconsolata

  4. IBM Plex Mono

    A marked zero and slab-like feet on i, l and r keep look-alike characters apart; seven weights with italics and Cyrillic.

    Monospace 14 styles OFL Try IBM Plex Mono

  5. Source Code Pro

    Variable from ExtraLight to Black with italics, the coding companion to an interface sans.

    Monospace 16 styles · variable OFL Try Source Code Pro

  6. Fira Code

    Adds programming ligatures that draw common operator sequences, such as arrows, as single symbols.

    Monospace 5 styles · variable OFL Try Fira Code

  7. Geist Mono

    A slashed zero, a flat-based i and a curved-foot l separate look-alikes; nine weights with italics and Cyrillic.

    Monospace 18 styles · variable OFL Try Geist Mono

  8. Cascadia Code

    Six weights with italics, with Arabic, Hebrew, Cyrillic and Greek alongside Latin.

    Monospace 12 styles · variable OFL Try Cascadia Code

  9. Victor Mono

    A narrow design with semi-connected cursive italics and programming ligatures, in seven weights.

    Monospace 14 styles · variable OFL Try Victor Mono

  10. DM Mono

    A slashed zero and a tailed l in three weights with italics; Medium is the heaviest, so there is no true bold for highlighting.

    Monospace 6 styles OFL Try DM Mono

  11. Ubuntu Mono

    Regular and Bold with true italics for terminals and code.

    Monospace 4 styles UFL Try Ubuntu Mono

  12. Anonymous Pro

    Four fonts made for coding, with clearly separated 0, O, 1, l and I.

    Monospace 4 styles OFL Try Anonymous Pro

  13. Red Hat Mono

    Geometric round letters with a slashed zero, variable from Light to Bold with italics.

    Monospace 10 styles · variable OFL Try Red Hat Mono

  14. Noto Sans Mono

    A slashed zero, a footed i and a tailed l, with a width axis that narrows the cell to fit more columns; nine weights, no italics.

    Monospace 9 styles · variable OFL Try Noto Sans Mono

  15. Martian Mono

    Broad letters with squared-off curves and a large x-height; a width axis condenses the cell, and weights run from Thin to ExtraBold with Cyrillic.

    Monospace 8 styles · variable OFL Try Martian Mono

  16. Atkinson Hyperlegible Mono

    Drawn so that 0, O, 1, l and I are easy to tell apart; seven weights with italics.

    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 fonts for coding

Which of these fonts have programming ligatures?

The note on each font mentions ligatures only where its record lists them. If you prefer plain characters, most editors have a setting to disable font ligatures.

How do I install a coding font in my editor?

Download the family, install the files in your operating system, then enter the family name in the editor or terminal font setting. Restart the application if the name is not recognized at once.

Can I use these fonts in a commercial product or a paid course?

Their open licenses allow commercial use, including in screenshots, videos and embedded in software. Each font page states its license.

Is a monospace font good for body text?

For short passages, yes; for long reading, no. Equal widths make words less distinct. Pair the monospace with a proportional family for prose.