visual studio reformat solution code example Example: vs2019 format all To format a selection: Ctrl+K, Ctrl+F To format a document: Ctrl+K, Ctrl+D