Google Workspace Marketplace
Add syntax-highlighted code blocks in Google Docs™: 46 languages with auto-detect, 8 themes, line numbers, and one-click undo.
개발자:
정보 업데이트:2026년 7월 23일
호환 기기:
7천+
개요
🧩 Code Blocks for Google Docs™ — turn a plain snippet into a syntax-highlighted, monospace code block with a solid color background, right where you select it.

Google Docs™ has no built-in code block: paste a snippet and you get a proportional font, no colors, and broken spacing. This add-on brings a real Google Docs™ code block — pick a language or let it auto-detect, choose a theme, and click Format code. Your selection turns into a highlighted block, and a single Ctrl+Z puts it back, exactly what code blocks for Google Docs™ should do.

🚀 How to insert a code block in Google Docs™

1. Install the add-on from the Google Workspace™ Marketplace.
2. In your document, open Extensions → Code Blocks for Google Docs™ → Open Code Blocks.
3. Select your snippet and pick a language, or leave it on Auto-detect.
4. Click Format code, and the block is highlighted in the theme you chose: monospace and clean.

Here is what code blocks for Google Docs™ gives you:

1️⃣ Syntax highlighting for 46 languages: Python, JavaScript, SQL, Java, C++, Go, and many more.
2️⃣ Auto-detect that names the language for you (Detected: Python) and remembers it.
3️⃣ 8 editor themes: VS Code Dark+, VS Code Light, Monokai, GitHub Light, GitHub Dark, Solarized Light, Solarized Dark, and Dracula.
4️⃣ A live preview, so you see the theme, font, and size before you touch your document.
5️⃣ Optional line numbers and a language label you can switch on per block.
6️⃣ Format all ``` blocks at once: paste from ChatGPT and tidy the whole document in one click.

🎨 Blocks that look like your editor

➤ Every code block in Google Docs™ gets a solid background, a monospace font, and colors from a real editor theme, not the flat gray you get by hand.
➤ Pick from 7 monospace fonts, including Roboto Mono, Fira Code, and JetBrains Mono.
➤ Set the size with a simple stepper, from 6 to 24 pt.
➤ The preview card updates instantly, so choosing a theme never means formatting first just to see it.

🔒 Your snippet stays exactly as you wrote it

➤ Formatting writes only color, font, and background, so your text, indentation, empty lines, and tabs are never changed.
➤ Copy a finished block back into your editor and it still runs; spaces and line breaks are preserved.
➤ Links inside the snippet are kept and stay clickable.
➤ A multi-line selection is wrapped in a filled block; a single word or fragment gets an inline code style instead.

🧹 Clean up and re-format in one click

➤ Changed your mind? Clear code formatting turns the block back into normal text, with no fiddly manual undo.
➤ Edited a line? Run Format code again on the same block, and it re-formats in place without doubling anything.
➤ Line numbers line up down the side and are inserted as text, so they copy together with the block.

⚙️ Code Blocks for Google Docs™ remembers your language, theme, font, size, and favorites between sessions, so your next snippet is one click away. The menu item Format selection (current settings) formats with your last settings without even opening the sidebar.

🛡️ Private by design: code blocks for Google Docs™ works only in the document you have open. Your content never leaves Google Docs™, nothing is sent to the developer, and there is no account to create. The add-on asks for just two permissions and runs entirely inside Google's environment.

❓ Frequently asked questions

How do I insert a code block in Google Docs™?

Open the sidebar from the Extensions menu, select your snippet, pick a language or use Auto-detect, and click Format code. To handle a whole document of ``` fenced blocks at once, use Format all ``` blocks from the menu.

How do I write code in Google Docs™ with colors?

Select it and click Format code. The add-on adds syntax highlighting and a monospace font in the theme you pick, so coding in Google Docs™ finally looks the way it does in your editor.

Does it change my code?

No. It adds only color, a monospace font, and a background. Indentation, empty lines, tabs, and links are left intact, and one Ctrl+Z (⌘Z) undoes everything in a single step.

Can I add inline code in Google Docs™?

Yes: select a word or part of a line and click Format code. You get an inline code style with a background instead of a full block.

Which languages are supported?

46, including Python, JavaScript, TypeScript, Java, C, C++, C#, SQL, HTML, CSS, Bash, Go, Rust, PHP, Ruby, Swift, Kotlin, R, and MATLAB, with Auto-detect for the rest.

Is Code Blocks for Google Docs™ free?

Yes, the add-on is free. Install it from the Google Workspace™ Marketplace and format your first snippet in seconds.

🎯 Stop wrestling with proportional fonts and gray boxes: a real code block in Google Docs™ is one install away. Add Code Blocks for Google Docs™ from the Google Workspace™ Marketplace today.

Google Docs™ and Google Workspace™ are trademarks of Google LLC.
추가정보
가격무료
개발자
비사업자
지원
개인정보처리방침
서비스 약관
Code Blocks for Google Docs™에서 아래에 표시된 권한을 요청합니다. 자세히 알아보기
Code Blocks for Google Docs™에서 Google 계정에 액세스해야 함
이렇게 하면 Code Blocks for Google Docs™에서 다음 작업을 할 수 있습니다.
애플리케이션 설치 시 사용한 문서 조회 및 관리
Google 애플리케이션 내 메시지 및 사이드바에 외부 웹 콘텐츠를 표시하고 실행합니다.
기본 Google 계정의 이메일 주소 확인
개인정보(공개로 설정한 개인정보 포함) 보기
리뷰
언어:
정렬 기준:
Google에서는 리뷰나 평점을 확인하지 않습니다. 리뷰에 대해 자세히 알아보기
댓글 없음
검색
검색어 지우기
검색 닫기
Google 앱
기본 메뉴