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
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 - IDEs Support (IntelliJ Platform) | JetBrains · Contact Support · Community · English (United States) 简体中文 · Sign in · Please consider editing your post and mark it as obsolete instead. Do you want to delete post? Answered · Vitali Plagov · Created March 04, 2018 00:20 · 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.
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
Guide: Reformat Java Code with Google Style Guide in IntelliJ IDE
Configuring Reformat Code for Java in IntelliJ IDE 1. Feat: Install code formatter plugin for JAVA in IntelliJ IDEA A google-java-format IntelliJ plugin is available from the plugin repository. To ... More on github.com
🌐 github.com
0
August 21, 2024
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
How to run google format by execute google-java-format Plugin in Intellij IDEA - Stack Overflow
But none of them are really solves the issue that how to run the plugin to reformat java code against java google format code style · Download and import intellij-java-google-style.xml to intellij only partly solves the issue, because using the code schema will not be 100% match against code ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Google
android.googlesource.com › platform › external › google-java-format › + › 0e3175afa9e092fc10542ae0e386a79518d9e893 › README.md
google-java-format
When enabled, it will replace the normal Reformat Code action, which can be triggered from the Code menu or with the Ctrl-Alt-L (by default) keyboard shortcut. The import ordering is not handled by this plugin, unfortunately. To fix the import order, download the IntelliJ Java Google 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
🌐
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 ...
🌐
Googlesource
gerrit-review.googlesource.com › Documentation › dev-intellij.html
Gerrit Code Review - IntelliJ IDEA Setup
Every time you start IntelliJ IDEA, 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 ...
🌐
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 ...
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
Note: IntelliJ 17 may not have a native "Reformat on Save" option. If missing, use the Ctrl+Alt+L (Windows/Linux) or Cmd+Opt+L (macOS) shortcut to manually format a file. ... Create a new Java class (right-click your project > New > Java Class).
🌐
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 - Now that you have imported the style guide to IntelliJ you can take advantage of the Code function menu and apply the style guide to your code. You have the option of reformatting an entire package/folder by selecting the package from the navigation menu, the currently open .java file, or a selection of code from within the currently open file by highlighting the code you wish to reformat. Select Code > Reformat Code. Your code will be reformatted automatically based on the Google Style Guide for Java.
🌐
YouTube
youtube.com › watch
How to Use Google Java Format in Intellij - Step by Step - YouTube
How to Use Google Java Format in Intellij - Step by Step | 🔒 Surfshark VPN Deal — Stay private and secure. $1.99/mo + 3 Months Free ▸ https://theslopfarm.co...
Published: November 18, 2025
🌐
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
jetbrains.com › help › idea › reformat-and-rearrange-code.html
Reformat code | IntelliJ IDEA Documentation
1 month ago - Reformat your code (Ctrl+Alt+L). IntelliJ IDEA will reformat your code in accordance with the current style settings, keeping existing formatting for the rules which you've selected.
🌐
JetBrains
blog.jetbrains.com › home › intellij idea › how to format java code
How to Format Java Code - The JetBrains Blog
June 6, 2024 - While coding with IntelliJ IDEA, we don’t need to manually format our code, as the IDE does it automatically. For example, if we press Enter (Windows/Linux) or ⏎ (macOS), the caret goes into the correct place for us to start typing. The same is true if we use other shortcuts like Shift+Enter (Windows/Linux) or ⇧⏎ (macOS) to move to the next line, or if we use code generation.
🌐
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 - 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.
Author: BrightProgrammer7
🌐
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.
🌐
Oreate AI
discover.oreateai.com › discover › how-to-format-code-in-intellij-idea-with-shortcuts-and-autosave
How to Format Code in IntelliJ IDEA With Shortcuts and Auto-Save | Oreate AI Guides
August 5, 2026 - Learn how to format code in IntelliJ IDEA using keyboard shortcuts like Ctrl+Alt+L, configure auto-format on save, and customize code style for Java and JavaScript.
🌐
JetBrains
jetbrains.com › guide › java › tutorials › reading-code › formatting
Formatting - JetBrains Guide
March 1, 2024 - If we encounter code that is not properly formatted, we can have IntelliJ IDEA reformat the code for us. In the file you want to reformat, use the shortcut ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux).