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

java - Intellij IDEA, format all code in a project - Stack Overflow
I really like IDEA's code formatting, but how do I get it to reformat all the code in a particular project without going through each file? I've found the option to tidy / optimise imports on code ... More on stackoverflow.com
🌐 stackoverflow.com
"Reformat Code" can not be called via the shortcut "⌘⌥L"
Review its shortcut in settings. More on reddit.com
🌐 r/Jetbrains
5
6
November 21, 2024
Essential IntelliJ Shortcuts

My favorite is ALT + J for select next occurrence. Multicursor is crazy useful. Once you get good with arrowkeys + modifiers and home/end it makes creating/editing stuff with the same pattern much easier.

More on reddit.com
🌐 r/java
54
212
April 29, 2019
VScode default formatter for Intellij
I'm sorry, I'm talking about frontend - Angular, so html, css/scss, ts, js More on reddit.com
🌐 r/IntelliJIDEA
3
0
April 2, 2025
🌐
JetBrains
blog.jetbrains.com › home › intellij idea › how to format java code
How to Format Java Code - The JetBrains Blog
June 6, 2024 - 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. If we copy some code that is inconsistently formatted and paste it into the editor, IntelliJ IDEA will format the code according to the project’s standards.
🌐
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).
🌐
Marit van Dijk
maritvandijk.com › home › for the record: how to format records in intellij idea
For the record: How to format records in IntelliJ IDEA - Marit van Dijk
May 19, 2025 - IntelliJ IDEA can format your code for you. Code will be formatted as you type it, and if needed you can Reformat the code (⌘⌥L on macOS) / Ctrl+Alt+L on Windows/Linux).
🌐
JetBrains
jetbrains.com › guide › java › tutorials › reformatting-code › reformatting-a-selection-or-class
Reformatting a selection of code or class - JetBrains Guide
February 17, 2023 - You can use ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux) to reformat a selection of code according to your reformat settings. Let's press ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux) in the class that contains this horribly formatted ...
🌐
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 ·
Find elsewhere
🌐
Medium
medium.com › @AlexanderObregon › intellij-ideas-code-style-features-creating-consistent-and-clean-code-bd1c32df8285
IntelliJ IDEA: Clean & Consistent Code | Medium
April 29, 2024 - Proper indentation, spacing, and alignment make the code easier to read. IntelliJ IDEA provides strong support for code formatting. Use Ctrl + Alt + L (Windows/Linux) or Cmd + Option + L (Mac) to reformat the current file or selected code.
🌐
YouTube
youtube.com › watch
How to format code in Intellij - YouTube
how to format java code in intellijHow to format code in Intellij#intellij #intellijidea
Published: May 9, 2025
🌐
IQCode
iqcode.com › code › other › reformat-intellij
reformat intellij Code Example
October 18, 2021 - // Mac CMD + Option + L // Windows Ctrl + Alt + L
🌐
YouTube
youtube.com › shorts › DX5C19cmX9o
IntelliJ IDEA coding tips - reformat - YouTube
#intellijidea #intellij #java #jetbrains #programming #shorts
Published: November 24, 2023
🌐
CodeGym
codegym.cc › java blog › random › intellij idea: coding style and code formatting
IntelliJ IDEA: Coding style and code formatting
December 19, 2023 - How to fix this? IntelliJ IDEA has a "Code" menu entry for various code manipulations. One such manipulation is "Reformat Code", which you can apply using Ctrl+L. After you do this, the annotation will be on one line, and the method declaration on another. It's worth noting right away that this operation is performed · on the currently selected code. If there is no selection, then the formatting operation is performed on everything.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › software development basics › intellij format code
IntelliJ Format Code | How to Create IntelliJ Formatting Code?
February 17, 2023 - IntelliJ IDEA assists you with keeping up with the expected; IntelliJ helps us format code as per rules, so IntelliJ provides the two types of schemes. We can design utilizing the IDE connection point, commodity, and offer with different colleagues. Plans are precious when you want to change the default code style settings for a few ventures on the double. When the principles are designed, you can conjure the Reformat code activity that changes the organizing of your code in the chosen code part, inside a document, or across your whole task.
Address: Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
YouTube
youtube.com › intellij idea by jetbrains
Code Formatting in IntelliJ IDEA (2020) - YouTube
IntelliJ IDEA lets you reformat your code according to the requirements you've specified in the Code Style settings. In this screencast we're going to look a...
Published: May 20, 2020
Views: 14K
🌐
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
🌐
JetBrains
jetbrains.com › help › idea › code-style.html
Code style and formatting | IntelliJ IDEA Documentation
February 11, 2024 - For more information, refer to EditorConfig. 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.
🌐
JetBrains
jetbrains.com › help › idea › reformat-file-dialog.html
You will be redirected shortly
August 9, 2022 - You will be redirected shortly · Redirecting… · Click here if you are not redirected
🌐
JetBrains
jetbrains.com › guide › java › tutorials › getting-started-intellij-idea › changing-code
Changing code - JetBrains Guide
February 17, 2023 - To automatically reformat code before you check it into version control: In your Commit tool window ⌘1 (macOS) / Alt+1 (Windows/Linux) there's a small cog icon, when you click that there's an option called Reformat code.
🌐
Etendo
docs.etendo.software › developer-guide › etendo-classic › getting-started › installation › intellij-code-formatting
Code Formatting Style in IntelliJ - Etendo Documentation
First, download the following IntelliJ formatting file. ... Click the gear icon → Import Schema → IntelliJ IDEA code style XML.