In Visual Studio 1. Ctrl+P 2.Type ">Format" and choose Format Document. You can choose Format Document With, if you want to use pretty print plugins that you have installed.