DEVPANTRY.COM

Source Code Pro Font

Source Code Pro

Monospace

By Google Fonts • Publisher: Google Fonts

16 styles availableWeights: 200, 300, 400, 500, 600, 700, 800, 900Variable Font Support
Live Type Tester
SIZE:36px
WEIGHT:
TRACKING:0px

Styles & Weights Specimen

Weight 200
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 300
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 400
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 500
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 600
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 700
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 800
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
Weight 900
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789

Quick Integration Snippets

CSS @import
@import url('https://fonts.googleapis.com/css2?family=Source%20Code%20Pro:wght@300;400;600;700;800&display=swap');

body {
  font-family: 'Source Code Pro', monospace;
}
NPM Package
npm install @fontsource/source-code-pro
HTML <link> tag
<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=Source%20Code%20Pro:wght@300;400;600;700;800&display=swap" rel="stylesheet">
Tailwind CSS Config
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      fontFamily: {
        'source-code-pro': ['Source Code Pro', monospace],
      },
    },
  },
};

Recommended Typography Pairings

Contrast & Hierarchy

Pairing Source Code Pro with high-contrast complementary typefaces creates strong visual hierarchy between headlines, interface body copy, and code blocks.

About Source Code Pro

Source Code Pro is a free, open-source monospace typeface published by Google Fonts. It is distributed under the OFL-1.1 license, making it completely free for commercial and personal use.

Font Weights & Styles

This typeface includes 16 styles. The available weights are: 200, 300, 400, 500, 600, 700, 800, 900.

Installation

You can install Source Code Pro via npm:

npm install @fontsource/source-code-pro

Or import it via CSS:

@import url('https://fonts.googleapis.com/css2?family=Source%20Code%20Pro:wght@300;400;600;700;800&display=swap');

Recommended Font Pairings

Creating typographic contrast is essential for high-impact web design. Here are battle-tested typeface pairings for Source Code Pro:

  • Inter (Sans) — Code Accent + Neutral UI: Balances monospaced syntax with hyper-legible interface text.
  • Satoshi (Sans) — Fixed-Width + Modernist Sans: Clean modernist geometry for headings and navigation.
  • Space Grotesk (Display) — Code Body + Tech Display: Future-forward tech aesthetic for developer platforms.

Related Tools