Fira Code
Monospace · Variable · OFL · by The Mozilla Foundation, Telefonica S.A. and others · #276 most used
Fonts that pair with Fira Code
The best fonts to pair with Fira Code are Fira Sans, Open Sans and Roboto. Use Fira Code for headings with Fira Sans, Open Sans or Roboto for body text, or set Fira Code as body text under Fira Sans or Fira Sans Condensed headings.
Fira Code for headings, each of these for body text. Curated pairings were chosen by hand; Suggested ones come from the pairing rules. How to use this page
withFira SansSuggested
Fira Code & Fira Sans
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code and Fira Sans were drawn as one family, so their proportions, x-heights and weights already match. The monospace carries the headlines and the sans-serif runs the paragraphs with no tuning needed.
withOpen SansSuggested
Fira Code & Open Sans
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code gives headlines a technical, typewriter edge. Open Sans is a sans-serif that reads comfortably at paragraph sizes, so the page feels built rather than coded.
Open pairing →withRobotoSuggested
Fira Code & Roboto
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code gives headlines a technical, typewriter edge. Roboto is a sans-serif that reads comfortably at paragraph sizes, so the page feels built rather than coded.
Open pairing →withLoraSuggested
Fira Code & Lora
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code gives headlines a technical, typewriter edge. Lora is a serif that reads comfortably at paragraph sizes, so the page feels built rather than coded.
Open pairing →withEB GaramondSuggested
Fira Code & EB Garamond
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code gives headlines a technical, typewriter edge. EB Garamond is a serif that reads comfortably at paragraph sizes, so the page feels built rather than coded.
withAlegreyaSuggested
Fira Code & Alegreya
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Fira Code gives headlines a technical, typewriter edge. Alegreya is a serif that reads comfortably at paragraph sizes, so the page feels built rather than coded.
Headings for Fira Code body text
Fira Code reads well in paragraphs. These heading fonts give it hierarchy.
Fira Sans
const pair = { heading, body }; // 0O 1lI
Fira Sans + Fira CodeCurated
Fira Sans Condensed
const pair = { heading, body }; // 0O 1lI
Fira Sans Condensed + Fira Code
Nunito
const pair = { heading, body }; // 0O 1lI
Nunito + Fira Code
Anton
const pair = { heading, body }; // 0O 1lI
Anton + Fira Code
Changa One
const pair = { heading, body }; // 0O 1lI
Changa One + Fira Code
Lilita One
const pair = { heading, body }; // 0O 1lI
Lilita One + Fira Code
Styles
Variable font: wght 300–700. 5 weights: Light, Regular, Medium, SemiBold, Bold.
- 300 Lightconst pair = { heading, body }; // 0O 1lI
- 400 Regularconst pair = { heading, body }; // 0O 1lI
- 500 Mediumconst pair = { heading, body }; // 0O 1lI
- 600 SemiBoldconst pair = { heading, body }; // 0O 1lI
- 700 Boldconst pair = { heading, body }; // 0O 1lI
Get the CSS for Fira Code
Pick how you load fonts. The Google Fonts link is the quickest; the npm and Next.js options self-host the files. Which one should I use?
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet">Paste in <head>. Loads every weight; remove the ones you do not use from the URL to save bytes.
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap');
.fira-code {
font-family: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}The @import goes at the top of your stylesheet. The <link> version above loads faster.
font-family: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
/* Headings */
h1, h2, h3 {
font-family: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
font-weight: 700;
}Fallbacks keep text readable while Fira Code downloads.
@import "tailwindcss";
@theme {
--font-sans: "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}Then use class="font-sans". Add the <link> tag from the HTML tab to load the font.
npm install @fontsource-variable/fira-code
// In your entry file
import "@fontsource-variable/fira-code";
/* CSS */
font-family: "Fira Code Variable", ui-monospace, Menlo, Consolas, monospace;Self-hosted through Fontsource: no requests to Google, works offline and with strict privacy rules.
import { Fira_Code } from "next/font/google";
const firaCode = Fira_Code({
subsets: ["latin"],
display: "swap",
});next/font self-hosts the files at build time and sets a size-adjusted fallback.
About Fira Code
Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like -> , <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one.
Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet. Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations. This is just a font rendering feature: underlying code remains ASCII-compatible.
This helps to read and understand code faster. For some frequent sequences like .. or // , ligatures allow us to correct spacing. To contribute, see https://github.com/tonsky/FiraCode .
Description from the font's documentation on Google Fonts.
Fira Code is free for commercial and personal use under the SIL Open Font License 1.1: on the web, in apps and in print, with no attribution needed on the finished work. Only selling the font files themselves is not allowed.
| Category | Monospace |
|---|---|
| Designers | The Mozilla Foundation, Telefonica S.A., Nikita Prokopov |
| Styles | 5 (variable) |
| Weights | 300, 400, 500, 600, 700 |
| Axes | wght 300–700 |
| Writing systems | cyrillic, cyrillic ext, greek, greek ext, latin, latin ext, symbols2 |
| Languages | 523 |
| Licence | SIL Open Font License 1.1 |
| Popularity | #276 of 1,959 Google Fonts |
| Added | March 24, 2019 |
| Last updated | September 16, 2025 |