Click above and type to preview your own text

monoVariable (wght)OFL

Google Sans Code

Monospace built for writing and reading code; tuned for clarity at small sizes.

Font settings

400
1
These settings in CSS
.google-sans-code {
  font-family: "Google Sans Code", monospace;
}

Waterfall

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

The quick brown fox jumps over the lazy dog

Character set

ABCDEFGHIJKLMNOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

0123456789

!@#$%&*()[]{}<>,.;:'"?/—–-+=

Paragraph

Typography is the craft of endowing human language with a durable visual form. It shapes how words are read, felt and remembered — from wayfinding on a station platform to the small print of a contract. Good type disappears into reading; great type gives a voice to the text.

Install

Google Fonts

Embed in the <head> of your HTML
<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:wght,MONO@300..800,0..1&display=swap" rel="stylesheet">
Use Google Sans Code in CSS
/* <weight>: use a value from 300 to 800 */

.google-sans-code {
  font-family: "Google Sans Code", monospace;
  font-weight: <weight>;
}

Fontsource

Install from npm
npm install @fontsource-variable/google-sans-code
Import once in your app entry
// Supports weights 300-800
import "@fontsource-variable/google-sans-code";
Use in CSS
body {
  font-family: "Google Sans Code Variable", monospace;
}

Self-host

Google Fonts and Fontsource serve stripped builds — most OpenType features are removed. Self-hosting the original files is the only way to get the full feature set.

Download the font files from the website and serve them yourself:

Declare with @font-face
@font-face {
  font-family: "Google Sans Code";
  src: url("/fonts/google-sans-code.woff2") format("woff2");
  font-display: swap;
}

Details

Designer
Google & Universal Thirst
Foundry
Google / Universal Thirst
Licence
OFL
Format
Variable (wght)
Variable axes
wght