This problem can be solve installing the google-java-format Plugin.

  1. Open plugins window (CTRL+Shift+A): plugins

  2. Click on browse repositories.

  3. Search for google-java-format

  4. Install the plugin.

  5. Restart the IDE.

  6. Enable the plugin executing the action (Ctrl+Shift+A): Reformat with google-java-format Update: in the newer version of the plugin select Reformat since the plugin overrides / enhances the functionality of the standard "Reformat" command.

Additional notes from the google-java-format README

The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox. (A notification will be presented when you first open a project offering to do this for you.)

To enable it by default in new projects, use File→Other Settings→Default Settings....

Answer from Geekecom on Stack Overflow
🌐
GitHub
github.com › google › styleguide › blob › gh-pages › intellij-java-google-style.xml
styleguide/intellij-java-google-style.xml at gh-pages · google/styleguide
Style guides for Google-originated open-source projects - styleguide/intellij-java-google-style.xml at gh-pages · google/styleguide
Author: google
🌐
JetBrains
plugins.jetbrains.com › plugin › 8527-google-java-format
google-java-format - IntelliJ IDEs Plugin | Marketplace
June 27, 2025 - Formats source code using the google-java-format tool. This plugin requires additional IDE configuration. For more information, read the documentation. What’s New: 1.36.1.1. Move settings page to Tools section. 1.36.1.0. Updated to use google-java-format 1.36.1. 1.35.0.0. Updated to use google-java-format 1.35.0.
🌐
Medium
medium.com › swlh › configuring-google-style-guide-for-java-for-intellij-c727af4ef248
Configuring Google Style Guide for Java for IntelliJ | by Reed Odeneal | The Startup | Medium
November 16, 2020 - Next to the Scheme drop-down menu select the gear icon then Import Scheme > IntelliJ IDEA code style XML then select the intellij-java-google-style.xml file you downloaded from GitHub.
🌐
Google
google.github.io › styleguide › intellij-java-google-style.xml
intellij-java-google-style.xml
xmlns:android · xmlns:.* · BY_NAME · *:id · http://schemas.android.com/apk/res/android · style · *:.*Style
🌐
GitHub
github.com › google › google-java-format
GitHub - google/google-java-format: Reformats Java source code to comply with Google Java Style. · GitHub
August 14, 2026 - A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category.
Author: google
🌐
Googlesource
gerrit-review.googlesource.com › Documentation › dev-intellij.html
Gerrit Code Review - IntelliJ IDEA Setup
So before submitting code, please make sure to run Reformat Code. ... Go to File → Settings → Editor → Code Style. Click on the wrench icon with the tooltip Show Scheme Actions. Click on Import Scheme. Select the previously downloaded file intellij-java-google-style.xml.
Find elsewhere
🌐
Cloudera
gerrit.cloudera.org › Documentation › dev-intellij.html
Gerrit Code Review - IntelliJ Setup
Every time you start IntelliJ, make sure to use Code → Reformat with google-java-format on an arbitrary line of code. This replaces the default CodeStyleManager with a custom one. Thus, uses of Reformat Code either via Code → Reformat Code, keyboard shortcuts, or the commit dialog will ...
🌐
DEV Community
dev.to › tschaka1904 › intellij-google-java-format-plugin-vs-intellij-java-google-style-xml-what-s-the-deal-197b
IntelliJ google-java-format plugin vs IntelliJ java-google-style.xml - what's the deal? - DEV Community
October 16, 2019 - The xml tries to mimic the Google style guides using IntelliJs built in code formatter and is written by a third party. The plugin comes directly from Google and seems to be a wrapper around the official formatter by Google as there are plugins for other platforms as well. To be as close as possible to the code style, I'd suggest the plugin over the xml. I'm used to using Prettier but it seems they have no Java support currently.
🌐
GitHub
raw.githubusercontent.com › google › styleguide › gh-pages › intellij-java-google-style.xml
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="GoogleStyle">
le> <match> <AND> <NAME>.*</NAME> <XML_NAMESPACE>.*</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> </rules> </arrangement> </codeStyleSettings> <Objective-C> <option name="INDENT_NAMESPACE_MEMBERS" value="0" /> <option name="INDENT_C_STRUCT_MEMBERS" value="2" /> <option name="INDENT_CLASS_MEMBERS" value="2" /> <option name="INDENT_VISIBILITY_KEYWORDS" value="1" /> <option name="INDENT_INSIDE_CODE_BLOCK" value="2" /> <option name="KEEP_STRUCTURES_IN_ONE_LINE" value="true" /> <option name="FUNCTION_PARAMETERS_WRAP" value="5" /> <option name="FUNCTION_CALL_ARGUMENTS_WRA
🌐
GitHub
github.com › google › styleguide › issues › 687
eclipse-java-google-style.xml and intellij-java-google-style.xml are obsolete and should be removed · Issue #687 · google/styleguide
April 25, 2022 - Google has moved its focus to google-java-format because “Eclipse and IntelliJ IDEA weren’t flexible enough to meet all the requirements of the Google Java Style Guide,” as described in google/google-java-format#695.
Author: google
🌐
Lean Tactic Reference
course.ccs.neu.edu › cs5010f18 › code-style.html
Code style
For Intellij IDEA, download intellij-java-google-style.xml and save it in the config/codestyles/ subdirectory of your IntelliJ configuration folder.
Author: going-magic
🌐
Medium
medium.com › @alexprut › integrate-google-java-style-guide-in-a-java-project-567abb6d7987
Integrate Google Java Style Guide in a Java project | by Alex Prut | Medium
July 28, 2019 - Download the IntelliJ Java Google Style file, then go to IntelliJ IDEA→Preferences→Editor→Code Style→Java→Config Button (near theScheme label)→Import Scheme→IntelliJ IDEA code style XML→now select the previously downloaded file.
🌐
GitHub
github.com › HPI-Information-Systems › Metanome › wiki › Installing-the-google-styleguide-settings-in-intellij-and-eclipse
Installing the google styleguide settings in intellij and eclipse
May 12, 2019 - Download it and go into Preferences -> Editor -> Code Style. Click on Manage and import the downloaded Style Setting file. Select GoogleStyle as new coding style. Download the eclipse-java-google-style.xml file from the http://code.google.c...
Author: HPI-Information-Systems
🌐
GitHub
github.com › BrightProgrammer7 › FORMAT-JAVA-CI › issues › 4
Guide: Reformat Java Code with Google Style Guide in IntelliJ IDE · Issue #4 · BrightProgrammer7/FORMAT-JAVA-CI
August 21, 2024 - To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox.
Author: BrightProgrammer7
Author: frellan
🌐
Github-wiki-see
github-wiki-see.page › m › HPI-Information-Systems › Metanome › wiki › Installing-the-google-styleguide-settings-in-intellij-and-eclipse
Installing the google styleguide settings in intellij and eclipse - HPI-Information-Systems/Metanome GitHub Wiki
May 12, 2019 - Download it and go into Preferences -> Editor -> Code Style. Click on Manage and import the downloaded Style Setting file. Select GoogleStyle as new coding style. Download the eclipse-java-google-style.xml file from the http://code.google.com/p/google-styleguide/ repo.