The best free monospace fonts for coding are Source Code Pro, Roboto Mono, Geist Mono, JetBrains Mono, Fira Code and IBM Plex Mono. All six are released under the SIL Open Font License, so you can use them in your editor, your docs and client work without paying. Source Code Pro and Roboto Mono are a safe first pick for most people, and JetBrains Mono or Fira Code are worth trying if you like programming ligatures.
Below is what makes a font good for code, a short comparison, notes on each pick, and how to switch fonts in VS Code and on a website.
What makes a good coding font?
A coding font has to do a few jobs that a normal text font does not. Look for these things before you look at style:
- Fixed width. Every character takes the same space, so indentation, columns and aligned comments stay straight.
- Clear look-alike characters. The zero should not look like a capital O, and the l, 1 and capital I should be easy to tell apart. A dotted or slashed zero helps a lot.
- Readable punctuation. Commas, full stops, colons, semicolons and brackets need enough weight to spot at a glance, because one missing character can break a build.
- Several weights and an italic. Editor themes often use bold and italic for keywords and comments, so a family with real italics looks better than a faked slant.
- A licence you can rely on. If you ship the font inside an app, a docs site or a client project, an open licence such as the OFL removes the guesswork.
Ligatures, where pairs like => or != are drawn as one symbol, are a matter of taste. They are optional in every editor that supports them.
Which free coding fonts are best?
| Font | Made by | Ligatures | Good for | Licence |
|---|---|---|---|---|
| Source Code Pro | Paul D. Hunt for Adobe | No | All-round editor and terminal use | SIL OFL |
| Roboto Mono | Christian Robertson | No | Editors, terminals, Android and Material projects | SIL OFL |
| Geist Mono (sibling of Geist) | Vercel with Basement Studio | No | Developer docs, dashboards, modern UI | SIL OFL |
| JetBrains Mono | JetBrains | Yes | Long sessions in an IDE | SIL OFL |
| Fira Code | Nikita Prokopov, built on Fira Mono | Yes | People who want ligatures | SIL OFL |
| IBM Plex Mono | IBM with Bold Monday | No | Docs and brands that use IBM Plex | SIL OFL |
All six fonts in the table can be downloaded from FreeFont.io, and each download includes the SIL OFL licence text.
Is Source Code Pro still a good choice?
Yes. Source Code Pro is a monospaced version of Adobe’s Source Sans, drawn by Paul D. Hunt. The zero has a dot, the l, 1 and I are clearly different, and the punctuation is easy to spot. The family runs from ExtraLight to Black with italics, so an editor theme can use real bold and italic styles. If you want one font that just works in an editor, a terminal and a docs site, start here.
It also pairs naturally with the rest of the Source family if you need a matching sans or serif for your docs.
Why pick Roboto Mono?
Roboto Mono takes the shapes of Roboto and fits them into fixed-width cells. Christian Robertson kept the open, slightly mechanical feel of the original, and the wide letters such as m and w are squeezed in neatly instead of looking cramped. It is a good fit if your product already uses Roboto, or if you build for Android and Material Design and want code samples to match the UI.
What about Geist Mono?
Geist is the brand font of Vercel, the company behind Next.js, made with Basement Studio. The Geist project started with the mono version and then added the sans. The download on FreeFont.io has the nine static weights of Geist Sans; Geist Mono has its own download page. Use Geist for headings and interface text and Geist Mono for code, and your docs will feel like one system.
Which coding fonts have ligatures?
Two well-known free options have programming ligatures built in:
- JetBrains Mono is made by JetBrains, the company behind IntelliJ IDEA and PyCharm. It is released under the SIL OFL and has ligatures you can switch off if you prefer plain characters.
- Fira Code by Nikita Prokopov extends Fira Mono with ligatures for common pairs and triples such as
->,<=and===. It is also released under the SIL OFL.
If ligatures distract you, turn them off and keep the font. Both still work well as plain monospace fonts.
Are Consolas and Courier New free to use?
Not in the same way. Consolas, designed by Luc(as) de Groot for Microsoft’s ClearType rendering, comes with Windows, Microsoft Office and Visual Studio. Courier New is owned by Monotype and also ships with Windows and Apple systems. You can use them on a computer that already has them installed, but having them installed does not give you the right to redistribute them or embed them in an app or website. The files on FreeFont.io are for personal use only. For a free font you can ship anywhere, pick one of the OFL fonts above. Our guide to personal use vs commercial use fonts explains the difference.
Which monospace fonts are better for design than for code?
Many monospace fonts on FreeFont.io are display families for posters, tech branding and headings rather than editor fonts. The free files are usually personal-use demos with a reduced character set, so they are not a good fit for daily coding, but they look great in a design with a technical feel:
- AOT Serial Mono by Arena of Type has squared-off curves and simple shapes. Personal use only; buy a licence for commercial work.
- Interval Mono by True Type Lab is drawn on a strict grid. The free file is a personal-use demo.
- Reflow Mono by Lettertype Studio is built for editorial layout rather than code. Personal use only.
- Caleb Mono by Craft Supply Co has square, pixel-like shapes with a retro computer feel. Personal use only.
Browse more in the monospace, typewriter and techno categories, and check each font page’s licence before you use one commercially.
How do you change the font in VS Code?
Install the font on your computer first, then open your settings.json and set the font family. This example uses Source Code Pro with a fallback:
"editor.fontFamily": "'Source Code Pro', Consolas, 'Courier New', monospace",
"editor.fontSize": 14,
"editor.fontLigatures": false
Set editor.fontLigatures to true if you use a ligature font such as JetBrains Mono or Fira Code. Restart the editor if the new font does not show straight away.
How do you use a coding font on a website?
For code blocks on a blog or docs site, load one OFL monospace font and give it a sensible fallback stack:
code, pre, kbd {
font-family: "Source Code Pro", ui-monospace, Menlo, Consolas, monospace;
font-size: 0.9em;
}
pre {
line-height: 1.5;
overflow-x: auto;
}
Self-hosting OFL fonts is allowed and can help with privacy and caching. See can you use Google Fonts commercially and our SIL Open Font License guide for the licence basics. If your site runs on Elementor, our guide on adding custom fonts to Elementor covers the upload steps.
Coding font questions
What is the best free font for coding?
There is no single winner, but Source Code Pro, JetBrains Mono and Fira Code are the most common free choices. Pick Source Code Pro for a plain, reliable font, and JetBrains Mono or Fira Code if you want ligatures.
Can I use these coding fonts commercially?
Yes, for the six fonts in the table. They are released under the SIL Open Font License, which allows commercial use. You cannot sell the font files on their own.
What is the difference between monospace and monoline?
A monospace font gives every character the same width. A monoline font uses strokes of one even thickness, but its letters can have any width. Our monoline category is mostly scripts and display fonts, not coding fonts.
Do coding fonts need ligatures?
No. Ligatures only change how some character pairs look on screen; the code itself does not change. Many developers prefer them off so every character stays visible.
What size should a coding font be?
Most people use 13 to 16 pixels in an editor. Pick the smallest size you can read for hours without leaning in, and add a little line height if lines feel crowded.