Google Sans Code
Monospace · Variable · OFL · by Google, Universal Thirst · #303 most used
Fonts that pair with Google Sans Code
The best fonts to pair with Google Sans Code are Google Sans, Open Sans and Roboto. Use Google Sans Code for headings with Google Sans, Open Sans or Roboto for body text, or set Google Sans Code as body text under Google Sans or Nunito headings.
Google Sans 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
withGoogle SansSuggested
Google Sans Code & Google Sans
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans Code and Google 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.
Open pairing →withOpen SansSuggested
Google Sans Code & Open Sans
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans 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.
withRobotoSuggested
Google Sans Code & Roboto
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans 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.
withLoraSuggested
Google Sans Code & Lora
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans 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.
withEB GaramondSuggested
Google Sans Code & EB Garamond
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans 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
Google Sans Code & Alegreya
Typography is the craft of endowing human language with a durable visual form. Good body text disappears: the …
Google Sans 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 Google Sans Code body text
Google Sans Code reads well in paragraphs. These heading fonts give it hierarchy.
Google Sans
const pair = { heading, body }; // 0O 1lI
Google Sans + Google Sans Code
Nunito
const pair = { heading, body }; // 0O 1lI
Nunito + Google Sans Code
Anton
const pair = { heading, body }; // 0O 1lI
Anton + Google Sans Code
Changa One
const pair = { heading, body }; // 0O 1lI
Changa One + Google Sans Code
Lilita One
const pair = { heading, body }; // 0O 1lI
Lilita One + Google Sans Code
Abril Fatface
const pair = { heading, body }; // 0O 1lI
Abril Fatface + Google Sans Code
Styles
Variable font: MONO 0–1, wght 300–800. 6 weights with italics: Light, Regular, Medium, SemiBold, Bold, ExtraBold.
- 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
- 800 ExtraBoldconst pair = { heading, body }; // 0O 1lI
- 300 Light Italicconst pair = { heading, body }; // 0O 1lI
- 400 Regular Italicconst pair = { heading, body }; // 0O 1lI
- 500 Medium Italicconst pair = { heading, body }; // 0O 1lI
- 600 SemiBold Italicconst pair = { heading, body }; // 0O 1lI
- 700 Bold Italicconst pair = { heading, body }; // 0O 1lI
- 800 ExtraBold Italicconst pair = { heading, body }; // 0O 1lI
Get the CSS for Google Sans 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=Google+Sans+Code:ital,wght@0,300..800;1,300..800&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=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');
.google-sans-code {
font-family: "Google Sans Code", ui-monospace, Menlo, Consolas, monospace;
}The @import goes at the top of your stylesheet. The <link> version above loads faster.
font-family: "Google Sans Code", ui-monospace, Menlo, Consolas, monospace;
/* Headings */
h1, h2, h3 {
font-family: "Google Sans Code", ui-monospace, Menlo, Consolas, monospace;
font-weight: 700;
}Fallbacks keep text readable while Google Sans Code downloads.
@import "tailwindcss";
@theme {
--font-sans: "Google Sans 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/google-sans-code
// In your entry file
import "@fontsource-variable/google-sans-code";
/* CSS */
font-family: "Google Sans Code Variable", ui-monospace, Menlo, Consolas, monospace;Self-hosted through Fontsource: no requests to Google, works offline and with strict privacy rules.
import { Google_Sans_Code } from "next/font/google";
const googleSansCode = Google_Sans_Code({
subsets: ["latin"],
display: "swap",
});next/font self-hosts the files at build time and sets a size-adjusted fallback.
About Google Sans Code
Google Sans Code is a free monospace Google Font by Google and Universal Thirst, a variable font. It covers the adlam, canadian aboriginal, cherokee, latin, latin ext, math, old permic, symbols, symbols2, syriac, vietnamese writing systems and was added to Google Fonts in February 2025.
Google Sans 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 | Google, Universal Thirst |
| Styles | 12, with italics (variable) |
| Weights | 300, 400, 500, 600, 700, 800 |
| Axes | MONO 0–1, wght 300–800 |
| Writing systems | adlam, canadian aboriginal, cherokee, latin, latin ext, math, old permic, symbols, symbols2, syriac, vietnamese |
| Languages | 512 |
| Licence | SIL Open Font License 1.1 |
| Popularity | #303 of 1,959 Google Fonts |
| Added | February 26, 2025 |
| Last updated | October 1, 2026 |