

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 在 Visual Studio 中格式化 CloudFormation 範本
<a name="tkv-cfn-editor-format"></a>
+ 在 Solution Explorer 中，開啟範本的內容 （按一下滑鼠右鍵） 選單，然後選擇**格式範本**。

  或者，若要格式化目前正在編輯的範本，請從**範本**功能表中選擇**格式範本**。  
![\[Dropdown menu showing options to deploy to CloudFormation, estimate cost, and format template.\]](http://docs.aws.amazon.com/zh_tw/toolkit-for-visual-studio/latest/user-guide/images/vs-editor-template-menu-format.png)

  您的 JSON 程式碼將會格式化，以清楚顯示其結構。  
![\[JSON code structure for CloudFormation template with UserData and Properties sections.\]](http://docs.aws.amazon.com/zh_tw/toolkit-for-visual-studio/latest/user-guide/images/vs-editor-cfn-formatting.png)