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
🌐
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. Give the schema a name (or use the default GoogleStyle name from the import).
Discussions

How to configure Google Java Code Formatter in Intellij IDEA 17? - Stack Overflow
In the latest versions of IntelliJ IDEA it seems that it isn't possible to import code style files like intellij-java-google-style.xml. I would like use the Google Java Code Style in this IDE but it More on stackoverflow.com
🌐 stackoverflow.com
android - How to change style to java google style on Intellij - Stack Overflow
I'm trying to set the google style for java in Intellij but until now I didn't succeed. My problem is after I imported the style I couldn't see any new error or warnings from what I had without the... More on stackoverflow.com
🌐 stackoverflow.com
Codestyle and formatters
Spotless? It can use the eclipse formatter which is pretty configurable, or the Google formatter, or others. More on reddit.com
🌐 r/java
27
18
October 21, 2024
Why is IntelliJ preferred over vscode for Java?
You should try IntelliJ for some serious work. Then try VSCode. Then decide :) More on reddit.com
🌐 r/java
235
125
December 1, 2025
🌐
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
🌐
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 - Click the Marketplace tab, search for the google-java-format plugin, and click theInstallbutton. The plugin will be disabled by default, you need to enable it manually. Alternatively, you can import the coding style in the IDE. 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.
🌐
JetBrains
plugins.jetbrains.com › plugin › 8527-google-java-format
google-java-format - IntelliJ IDEs Plugin | Marketplace
June 27, 2025 - IntelliJ provides extensive support for different code style flavors — try using the built-in tool and configuring your own style. Don’t expect much from Google in this regard; they are outdated. ... Works fine. I like that I can use it to run spotless without having to run a gradle build. ... Doesn't work with Java 21 String templates feature, always get error notification.
🌐
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 - For IntelliJ, I see here two options. It's either installing the google-java-format plugin or importing the java-google-style.xml. One could think that both options are resulting in the same format, but unfortunately this doesn't seem to be the case. As an example, the plugin would format streams ...
Find elsewhere
🌐
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.
🌐
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.
🌐
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
🌐
GitHub
github.com › frellan › GoogleStyle
GitHub - frellan/GoogleStyle: Google's Java Code Style as a scheme for IntelliJ IDEA.
Pick "IntelliJ IDEA code style XML" and pick your file. IntelliJ will now automatically format your Java code according to Google!
Author: frellan
🌐
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
🌐
Cloudera
gerrit.cloudera.org › Documentation › dev-intellij.html
Gerrit Code Review - IntelliJ Setup
Select the previously downloaded file intellij-java-google-style.xml.
🌐
Domyassignments
domyassignments.com › home › introduction to google java coding style
Introduction to Google Java Coding Style
March 1, 2024 - Your code will now automatically be formatted according to Google’s standards. Plugin Installation: In IntelliJ IDEA, go to Settings > Plugins, search for “Google Java Format”, and install the plugin.
🌐
jasta
jasta.io › how-tos › improve-code-with-google-code-style-in-intellij
Improve Your Code with Google Code Style in IntelliJ - jasta
March 17, 2024 - To now import your XML file you have to click on the settings wheel, select the last menu entry, Import Scheme, and last but not least click on IntelliJ IDEA code style XML. Now a popup will be displayed to you, where you have to select your Google Code Style XML file. So find it on the presented explorer and click on it once. To confirm your choice you have to press OK on the bottom of the dialog. After confirming your choice, you have now the option to give your code style a name. Just give it a name you like and you remember that this is the Google Code Style. In this example, I named it GoogleStyle.
🌐
GitHub
github.com › pmendelski › intellij-codestyle
GitHub - pmendelski/intellij-codestyle: Google based java code style for IntelliJ
This repository provides two code style schemes for IntelliJ (required version >= 2017.1) GoogleStyle - Close copy of Google Java style guide
Starred by 6 users
Forked by 5 users
🌐
Iopenv
iopenv.com › 344TRJ7IJ › Configure-Google-Java-Code-Style-and-Code-Format-Shortcuts-in-IntelliJ-IDEA
Configure Google Java Code Style and Code Format Shortcuts in IntelliJ IDEA - www.iopenv.com
Select "Editor ->"; "Code Style" ... used here): 4. Set the "Scheme:" of the current project to the "Google Style" imported in step 3. Editor -> Code Style -; Java -> Imports> ......
🌐
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.