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
🌐
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.
Discussions

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
Strict Code Formatter
There is spotless which can format your code according to "Google style" or any Eclipse formatting profile. If you want formatting based on IntelliJ settings you are basically out of luck. I am not aware of any available tooling, and for the rest it is a proprietary engine. Further more, IntelliJ has just 1 config file for all formatting rules for all supporter languages. Which is rather problematic. At work we maintain an IntelliJ formatting profile and Eclipse formatting profile which should agree with each other. This also means certain formatting rules are disabled as IntelliJ and Eclipse have no compatible settings for certain rules. For example, nice Javadoc formatting results in conflicting results. So we use a less nice setting. Besides those formatting profiles we use checkstyle to verify the resulting code. More on reddit.com
🌐 r/java
30
41
January 5, 2024
Google java format in IntelliJ IDEA - Stack Overflow
I am using the Google-java-formatter in IntelliJ IDEA. I tried all the option present under setting > editor > code Style > java but not able to change this behavior. private void More on stackoverflow.com
🌐 stackoverflow.com
Google -java-format Code formatter for java Intellij - Stack Overflow
I installed google-java-format in Intellij and made sure its enabled for current project. However its still not working, CTRL+ALT+L, which is by default in Intellij is still working. Also, does this More on stackoverflow.com
🌐 stackoverflow.com
🌐
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 - This is a deliberate design decision to unify our code formatting on a single format. A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and ...
Author: google
🌐
Googlesource
gerrit-review.googlesource.com › Documentation › dev-intellij.html
Gerrit Code Review - IntelliJ IDEA Setup
Search for the plugin google-java-format by Google. Install it. Restart IntelliJ IDEA.
🌐
Google
android.googlesource.com › platform › external › google-java-format › + › 0e3175afa9e092fc10542ae0e386a79518d9e893 › README.md
google-java-format
A google-java-format Eclipse plugin ... adds a google-java-format formatter implementation that can be configured in Window > Preferences > Java > Code Style > Formatter > Formatter Implementation....
🌐
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 - A style guide is a set of standards that development teams can implement to ensure consistency across projects for how code should be formatted and organized. Many languages maintain official guides while most others have widely accepted standards such as Google Style Guide for Java. Leveraging IntelliJ’s Code Style feature you can import and automatically enforce Google Java Style Guide as you write your code.
🌐
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
Find elsewhere
🌐
javathinking
javathinking.com › blog › how-to-configure-google-java-code-formatter-in-intellij-idea-17
How to Configure Google Java Code Formatter in IntelliJ IDEA 17: Solving intellij-java-google-style.xml Import Issues — javathinking.com
The intellij-java-google-style.xml file is an XML-based configuration that encodes Google’s Java style rules (e.g., 4-space indentation, 100-character line length, braces on the same line as declarations). IntelliJ IDEA uses this file to enforce consistent formatting via its built-in code formatter.
🌐
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 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.
🌐
YouTube
youtube.com › codewis technologies
Adding Google Code Formatter to the intellij IDEA - YouTube
Format our code with google code formatter for java Adding Formatter pluggin to intellij IDEA
Published: January 7, 2020
Views: 2K
🌐
SourceForge
sourceforge.net › projects › google-java-format.mirror
google-java-format download | SourceForge.net
July 30, 2026 - Click the Marketplace tab, search for the google-java-format plugin, and click the Install button. You can use the formatter through the formatSource methods ... Include the library in your maven/gradle/etc. configuration · IntelliJ, Android Studio, and other JetBrains IDEs
🌐
Google
android.googlesource.com › platform › external › google-java-format
platform/external/google-java-format - Git at Google
This is a deliberate design decision to unify our code formatting on a single format. 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.
🌐
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.
🌐
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.
🌐
Reddit
reddit.com › r/java › codestyle and formatters
r/java on Reddit: Codestyle and formatters
October 21, 2024 -

Hi y'all,

My team would like to standardise code formatting and enforce it in CI. We've tried google-java-formatter but it doesn't look nearly as good as inteliJ's default settings.

Ideally, we'd like to export inteliJs defaults (to have the benefits of built in formatter) and use something that would enforce it on CI build. Has anyone done it? What are your pipelines like? Any tips and tricks?

🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360000094790-google-java-formatter-and-Complete-Statement-shortcut
google-java-formatter and Complete Statement shortcut – IDEs Support (IntelliJ Platform) | JetBrains
March 3, 2018 - I like to use `Ctrl-Shift-Enter` shortcut for Complete Statement action. Now when I have installed & enabled `google-java-formatter` plugin, this shortcut doesn't act as expected. Before plugin...