Format XML code in Eclipse February 21, 2023 by Tarik Ctrl+Shift+F Will do it for you, and you can configure it in Window -> Preferences -> XML -> Xml Files -> Editor