Code Blocks for Google Docs™ — syntax-highlighted code blocks, 46 languages, and editor themes for Google Docs™.

Select code anywhere in your Google Doc and turn it into a real code block — syntax highlighting for 46 languages, a monospace font, and a solid themed background, right where you selected it. Pick from 8 editor themes (VS Code, Monokai, GitHub, Solarized, Dracula) with a live preview, switch on line numbers or a language label, and format a whole document of ``` fenced blocks from ChatGPT in one click. Your text, indentation, and links stay exactly as you wrote them, and a single Ctrl+Z undoes everything.

Need help or found a problem? Email us and a person will reply — questions, bug reports, and feedback all welcome.

Contact support: [email protected]
  1. Open a Google Doc and choose Extensions → Code Blocks for Google Docs → Open Code Blocks.
  2. Select the code in your document and pick a language, or leave it on Auto-detect.
  3. Click Format code — your code is highlighted with a monospace font and a themed background. Press Ctrl+Z to undo.

Works only with the document you have open. Your code never leaves it — no external servers, no account required.

Install from Google Workspace Marketplace