The formatting shortcuts in Intellij IDEA are :

  • For Windows : Ctrl + Alt + L
  • For Ubuntu : Ctrl + Alt + Windows + L
  • For Mac : ⌥ (Option) + ⌘ (Command) + L
Answer from axelrod on Stack Overflow
🌐
JetBrains
jetbrains.com › help › idea › reformat-and-rearrange-code.html
Reformat code | IntelliJ IDEA Documentation
3 weeks 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 - If we go back to our code and reformat it, we can see IntelliJ IDEA uses the new EditorConfig settings to format the changed lines in the file. Note that our EditorConfig settings are used instead of the settings we defined in our Java Code Style preferences, which still has our old settings for Chained Method Calls.
Discussions

Intellij finally has a built in "Reformat code and organize imports" save action in 2021.2

It automatically saves, so usually I just use the reformat code shortcut (rather than using save and have auto format in other IDEs)

More on reddit.com
🌐 r/IntelliJIDEA
4
16
July 28, 2021
Intellij-Plugin is overwriting Reformat-Code
The Plugin for IntelliJ-IDEA is overwriting the Reformat-Code given by IntelliJ Idea indead of only reformat the code with the plugin when selecting "Reformat with Google-Code Style". It ... More on github.com
🌐 github.com
2
October 17, 2016
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
Making auto format line up with IntelliJ formatting?
I assume you're talking about the Java formatter here. The Java extension uses Eclipse libraries, so the formatter is configured using Eclipse formatter preferences (a list of available formatter preferences can be found here ). Since Eclipse formatter preferences are not the same as IntelliJ formatter preferences, you'd have to configure each rule manually until it matches what you want (if you want a GUI, you'll need to edit the preferences in the Eclipse IDE). The alternative would be some kind of automatic conversion tool. Eclipse formatter preferences can be converted to IntelliJ preferences, but not vice versa . Another option would be to use some established formatter options that are already available in both the Eclipse and IntelliJ format, such as Google Java Style Guide . More on reddit.com
🌐 r/vscode
6
1
November 2, 2021
🌐
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.
🌐
JetBrains
jetbrains.com › help › idea › code-style.html
Code style and formatting | IntelliJ IDEA Documentation
February 11, 2024 - Once the rules are configured, you can invoke the Reformat code action that changes the formatting of your code in the selected code fragment, within a file, or across your entire project.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
IntelliJ Code Formatter - Visual Studio Marketplace
December 24, 2025 - Extension for Visual Studio Code - Format code using IntelliJ IDEA's formatting engine
Find elsewhere
🌐
Medium
hirosht.medium.com › automatically-reformat-code-on-save-in-intellij-ddf7842801e0
Automatically reformat code on save in IntelliJ - Hirosh Tharaka - Medium
July 12, 2023 - Automatically reformat code on save in IntelliJ Configure the IDE to reformat code in modified files automatically when your changes are saved. Press Ctrl+Alt+S to open the IDE settings select Tools …
🌐
Reddit
reddit.com › r/intellijidea › intellij finally has a built in "reformat code and organize imports" save action in 2021.2
r/IntelliJIDEA on Reddit: Intellij finally has a built in "Reformat code and organize imports" save action in 2021.2
July 28, 2021 -

Intellij finally implemented a feature that other IDEs had for years. You can now finally set up Intellij to automatically reformat your code and organize your imports on each save. There is no more need to either download the "Save Actions plugin" or to write your own macro to execute these two commands on each save. It was about effin' time.

🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360002443759-Reformatting-Code-Style-doesn-t-do-anything
Reformatting/Code Style doesn't do anything – IDEs Support (IntelliJ Platform) | JetBrains
January 10, 2019 - But today it stopped working completely for the PHP styles. Neither the preview changes, nor my code when I press CMD + OPTION + L. It says everything is properly formatted.
🌐
JetBrains
jetbrains.com › help › idea › command-line-formatter.html
Format files from the command line | IntelliJ IDEA Documentation
4 weeks ago - Non-recursively format all the .xml and .html files in the C:\Data\src directory using code style settings from C:\Data\settings.xml: idea64.exe format -s C:\Data\settings.xml -m *.xml,*.html C:\Data\src · IntelliJ IDEA includes a script for running the command-line code formatter.
🌐
JetBrains
intellij-support.jetbrains.com › hc › zh-cn › community › posts › 206793949-How-to-format-the-code-
How to format the code? – IDEs Support (IntelliJ Platform) | JetBrains
May 26, 2016 - IDEs Support (IntelliJ Platform) | JetBrains · 联系支持服务 · 社区 · 简体中文 English (United States) 登录 · 请考虑编辑您的帖子并将其标记为已过时。 您是否想删除帖子? · 已完成 · Chong Lor · 创建于 2016年05月26日 18:22 · Once I've select a bunch of codes on the page, how do I format so that they are indented correctly?
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 207501465-Reformat-Code-Options
Reformat Code Options – IDEs Support (IntelliJ Platform) | JetBrains
May 24, 2016 - Perhaps these option requires not a tick box, but a drop down box of possible options including "Do nothing". This sort of formatting issue exists for a lot of these options, what I want is the opposite of what the tick means, but unticking it means "Do nothing".
🌐
Stackademic
blog.stackademic.com › most-developers-at-work-use-github-copilot-5aac3b23d817
Most developers at work use GitHub Copilot. The best learning resources were built for something else. | by Utkarsh Singh | Stackademic
April 10, 2026 - So here’s the tension: the best structured learning resource I found for working with AI coding tools — claude-howto, a genuinely well-built tutorial repo — is written for Claude Code and the CLI. It’s excellent if that’s what you use. Most people at work don’t. I spent a few hours fixing that (thanks to Claude :D). copilot-howto is a full conversion of that tutorial structure into GitHub Copilot. Same progressive learning approach, same module format, completely rewritten for the tools people actually have in front of them.
🌐
GitHub
github.com › google › google-java-format › issues › 85
Intellij-Plugin is overwriting Reformat-Code · Issue #85 · google/google-java-format
October 17, 2016 - The Plugin for IntelliJ-IDEA is overwriting the Reformat-Code given by IntelliJ Idea indead of only reformat the code with the plugin when selecting "Reformat with Google-Code Style". It is not possible to use the project own reformatter...
Author: google
🌐
JetBrains
jetbrains.com › guide › tips › reformat-code-or-file
Reformat Your Code - JetBrains Guide
June 12, 2024 - Lastly, there are additional settings you can use for reformatting your code which you can access by invoking the "Reformat Code Dialog" ⌘⌥⇧L (macOS) / Ctrl+Alt+Shift+L (Windows/Linux). The options here will vary depending on which type of code you're working with so try it out and see what you can learn! Want to learn more? Check out the in depth reformatting tutorial for IntelliJ IDEA ·
🌐
Prettier
prettier.io › docs › install
Install · Prettier
If you forget to install Prettier first, bunx will temporarily download the latest version. That’s not a good idea when using Prettier, because we change how code is formatted in each release! It’s important to have a locked down version of Prettier in your package.json.
🌐
JetBrains
jetbrains.com › guide › java › tutorials › reformatting-code › reformatting-a-directory
Reformatting code in a directory - JetBrains Guide
February 17, 2023 - From the context menu you can press the Reformat Code option to reformat all the code in that directory: Alternatively, you can select the directory and use ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux) to display the same dialog.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360010381139-ESLint-Reformat-code
ESLint & Reformat code – IDEs Support (IntelliJ Platform) | JetBrains
March 2, 2021 - We have a `.eslintrc.js` file that PyCharm is reading charmingly using right-arrow and selecting "Apply ESLint code style rules", but not enforce the styles when I reformat the code using Cmd+Shift+L (shortcut for "Reformat Code" action).
🌐
GitHub
docs.github.com › en › copilot › how-tos › use-copilot-agents › coding-agent › create-skills
Adding agent skills for GitHub Copilot - GitHub Docs
Agent skills work with Copilot cloud agent, Copilot code review, the GitHub Copilot CLI, the GitHub Copilot app, and agent mode in Visual Studio Code.
🌐
JetBrains
jetbrains.com › help › idea › using-code-editor.html
Editor basics | IntelliJ IDEA Documentation
4 weeks ago - Learn about actions to navigate inside IntelliJ IDEA editor, search for caret, lines, and blocks of code; edit code, configure editor tabs, shortcuts and editor settings.