Follow Google's style rules when contributing to Google-originated open-source projects.
Adopt Google's C++ or Python guides as a baseline for your team's internal coding standards.
Set up linters and editor configurations based on these guides to automatically enforce style rules.
Learn language best practices and reasoning behind conventions from detailed, well-explained guides.
Google's Style Guide repository is a collection of official coding conventions that Google uses for its open-source projects. A style guide is a document that specifies how code should be written in a given language, things like how to name variables, whether to use tabs or spaces, how long lines should be, how to structure comments, and which language features to avoid. The purpose is to make large codebases easier to read and maintain because all the code looks and behaves consistently, regardless of who wrote it. The repository covers a wide range of programming languages and markup formats. Guides exist for C++, C#, Go, Java, JavaScript, TypeScript, Python, R, Shell scripting, Swift, Objective-C, HTML and CSS, AngularJS, JSON, Markdown, Vim script, and Common Lisp. Each guide is a long, detailed HTML or Markdown document that explains not just the rules but often the reasoning behind them, which makes them useful as learning resources beyond their role as team standards. You would use these guides if you are contributing to a Google-originated open-source project, since those projects typically require following the corresponding language guide. Many organizations also adopt Google's guides as the baseline for their own internal standards, particularly for C++ and Python where the Google guides are especially thorough and widely respected. Linter tools and editor configurations based on these guides are available to enforce the rules automatically. The repository itself contains no runnable application code. It is purely documentation, HTML files, Markdown files, and configuration files for editors. The guides are licensed under Creative Commons Attribution 3.0, meaning anyone can share and adapt them with attribution.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.