The Best Free Fonts for Coding & Programming

You may have not given much thought to the font you currently use for coding before. You are probably happy with the default monospaced font that comes with your favorite IDE and over time have become accustomed to it. These fonts may be the best font for you, but are they actually good for general coding? I would never tell you which font is good (currently I am using Ubuntu Mono Regular) or bad, as there is no way to categorically measure it. It does come down to each individual coders preference. But there are certain fonts freely available that have been designed purely with programmers and coders in mind.

With this post I just wanted to highlight some of the best free monospaced fonts that have been optimized for programming and to also offer some basic pointers for selecting a particular font.

So what should you be looking for in a good monospaced programming font? For starters it has to be clear and highly readable, proportionally-spaced, and for obvious reasons, needs to come packaged with an extended characterset with distinguishable glyphs. And perhaps more importantly than legibilty, the ‘1’, ‘i’ & ‘l’ and ‘o’, ‘0’ & ‘O’ have to be clearly identifiable as different characters. It is using this base criteria that I selected the free fonts below.

Quick note: For the screenshots I had intended to preview the fonts in Sublime Text using example code, but this proved to be far too impractical as the screenshots ended up being far too large when attempting to properly show the code in action. Instead I opted to use Flipping Typical, a handy web-based tool for previewing the fonts you have pre-installed on your computer, using the basic characters you can see below. Hopefully this will still give you a decent visual overview of what each font offers.

Free Monospaced Fonts for Coding

Anonymous Pro by Mark Simonson (Regular, Italic, Bold, and Bold Italic)

Anonymous Pro Regular Italic Bold free programming code fonts

Anonymous Pro Download Page →

Inconsolata by Raph Levien

Inconsolata free programming code fonts

Inconsolata Download Page →

Hermit by Pablo Caro (Light, Medium & Bold)

Hermit Light Medium Bold free programming code fonts

Hermit Download Page →

Edlo by Eric Hamiter

Edlo free programming code fonts

Edlo Download Page →

Meslo by André Berg (LG Small, LG Medium & LG Large)

Meslo free programming code fonts

Meslo Download Page →

Vera Sans Mono by Bitstream (Roman, Oblique, Bold & Bold Oblique)

Vera Sans Mono Roman Oblique Bold free programming code fonts

Vera Sans Mono Bitstream Download Page →

Fira Mono by Mozilla (Regular & Bold)

Fira Mono Regular Bold free programming code fonts

Fira Mono Mozilla Download Page →

PT Mono by Alexandra Korolkova (Regular & Bold)

PT Mono Regular Bold free programming code fonts

PT Mono Download Page →

Envy Code by Damien Guard (Regular, Italic & Bold)

Envy Code Regular Italic Bold free programming code fonts

Envy Code Download Page →

Ubuntu Mono by Dalton Maag

Ubuntu Mono free programming code fonts

Ubuntu Mono Download Page →

Liberation Mono by Steve Matteson for RedHat

Liberation Mono free programming code fonts

Liberation Mono Redhat Download Page →

Fantasque Sans Mono by Jany Belluz (Regular, Italic & Bold)

Fantasque Sans Mono Regular Italic Bold free programming code fonts

Fantasque Sans Mono Download Page →

Droid Sans Mono by Steve Matteson for Android

Droid Sans Mono free programming code fonts

Droid Sans Mono Android mobile Download Page →

Consolas Mono by Microsoft

Consolas Mono free programming code fonts

Consolas Mono Microsoft Download Page →

Drucifer Monospace by Drucifer

Drucifer Monospace free programming code fonts

Drucifer Monospace Download Page →

BPmono by Backpacker (Regular, Italic & Bold)

BPmono Regular Italic Bold free programming code fonts

BPmono by Backpacker Download Page →

DejaVu (Regular, Oblique, Bold & Bold Oblique)

DejaVu Regular Oblique Bold free programming code fonts

DejaVu Download Page →

Monaco by Susan Kare and Kris Holmes for OS X

Monaco apple mac OSX free programming code fonts

Monaco Download Page →

(639 Posts)

Paul Andrew

Paul is the founder and editor of Speckyboy Design Magazine. He has many years experience within the web design industry and a passion for the latest web technologies and design trends. He lives in the small town of Inverness in the north of Scotland. Follow him on Twitter, Facebook or Google+.

Comments

  • I once tried with Open Sans Light, kinda liked it but I agree with most developers that Monospace fonts are what’s best for the job. I use DejaVu.

  • Jacob Groß

    I don’t know why, but I like Adobe’s Source Sans Pro the most.

  • EagleEye

    I have at least three requirements that a font must have to be successfully used for coding and programming. First, there must be a clear distinction between a uppercase letters O and Q, and and the number zero. Clearly, Droid Sans Mon fails to meet this requirement for the letter O and zero. Also, fonts that rely on a single dot inside the zero fail too because the dot is nearly invisible when the font size is small.

    Second, there must be sufficient spacing between characters so that they are legible. Monoco fails this test when left and right brackets appear next to one another.

    And third, the lowercase letter l and the number 1 must be clearly distinguishable especially when the font size is small. Liberation Mono fails, and some others fonts are close failures.

  • sam

    Proggy Clean (most any Proggy variant), and Pixel Carnage are my goto ssh fonts

  • what? no Source Code Pro?

  • DejaVu is really great, thank for tips.

  • Like Rizky I’m also surprised that Source Code Pro isn’t in the list.

  • Álvaro Martínez

    My exact thoughts.

    Source Code Pro has become my favorite coding font.
    I use it in Sublime Text at a size of 9 in the semibold weight and it looks awesome!

    BTW, it’s Source Code* Pro :P