Easily format and display code in Google Docs

Easily format and display code in Google Docs

What’s changing

Currently, when working in Google Docs, collaborators who want to present code have to paste it in the document and then manually apply styles by highlighting syntax. 
We’re adding a new smart canvas feature that makes this process much easier by enabling you to format and display code in Docs with code blocks. 
"code

Who’s impacted

End users 

Why you’d use it 

This feature gives you the ability to visualize code with industry standards, making code readable and collaboration much easier. 

Getting started 

  • Admins: There is no admin control for this feature. 
  • End users: To format and display code in a Doc, select Insert > Building blocks > Code blocks > choose your programming language or search @ > Code blocks > choose your programming language. Visit the Help Center to learn more about inserting smart chips & building blocks in your Google Doc

Rollout pace 

  • Rapid Release domains: Extended rollout (potentially longer than 15 days for feature visibility) starting on December 14, 2022 
  • Scheduled Release domains: Extended rollout (potentially longer than 15 days for feature visibility) starting on January 3, 2023 

Availability 

  • Available to Google Workspace Business Standard, Business Plus, Enterprise Standard, Enterprise Plus, Education Standard, Education Plus customers and Nonprofits 
  • Not available to Google Workspace Essentials, Business Starter, Enterprise Essentials, Education Fundamentals, the Teaching and Learning Upgrade, Frontline, as well as legacy G Suite Basic and Business customers 
  • Not available to users with personal Google Accounts 

Resources 

Roadmap