Skip to content
CodeFont
Font GalleryBest Coding FontsFeatures
Get Extension
English
English日本語简体中文繁體中文PortuguêsDeutschFrançais한국어
Font GalleryBest Coding FontsFeaturesHow It WorksGitHubGet Extension
  1. Home
  2. Best Coding Fonts
  3. A code font for Microsoft Word

A code font for Microsoft Word

Use Consolas or Courier New, if installed, for a code block in Word. Save the formatting as a paragraph style so later examples use the same font, spacing and indentation.

Font Installation & Setup Guides
  • Fira Code vs JetBrains Mono for reading code
  • Cascadia Code vs Cascadia Mono for code and logs
  • Change the VS Code integrated terminal font
  • VS Code editor font not changing? Check the fallback
  • Coding font readability test for 0/O and 1/l/I
  • What font is code written in?

Format one code block

In Word for Windows, paste the sample below using Keep Text Only and select both paragraphs. On Home, choose the font and set paragraph spacing before and after to zero. Check that the equals signs line up and that you can tell the letter O from zero.

row_O = 10
row_0 = 20

Reuse the formatting

Right-click the formatted selection, choose Styles, then Create a Style. Name it Code Block. Paste a second snippet as text, select its paragraphs and apply Code Block from Home → Styles. To adjust all examples together, right-click Code Block in the gallery and choose Modify.

  • Consolas specimen
  • Courier New specimen

Resources

  • Microsoft Word · Styles
  • Microsoft · Consolas

CodeFont

CodeFont is a local-only VS Code extension for finding, verifying, and applying monospace coding fonts to your editor and terminal.

Product

  • Features
  • Changelog
  • How It Works
  • Font Gallery
  • Best Coding Fonts

Resources

  • GitHub
  • Report a Bug
  • MIT License

Legal

  • About
  • Contact
  • Privacy Policy
  • Terms of Service
© 2026 CodeFont. All Rights Reserved.