Terraform HCL Formatter
// Format Terraform configuration files
#About Terraform HCL Formatter
Free online Terraform HCL formatter. Format Terraform configuration files with terraform fmt-style indentation and alignment. This tool runs entirely in your browser — your data is never sent to a server. Just paste your input, get instant results, and copy with one click. No sign-up or installation required.
#FAQ
Does this match terraform fmt output? ▾
The formatter follows terraform fmt conventions with 2-space indentation and aligned equals signs within blocks. It handles all standard HCL block types.
What HCL constructs are supported? ▾
The formatter handles resource, data, variable, output, locals, module, provider, and terraform blocks, including heredoc strings and comments.
</> Embed this tool ▾
Copy this code to embed the tool on your website. Adjust the height to fit your layout.
<iframe src="https://www.browserutils.dev/embed/terraform-formatter" width="100%" height="500" frameborder="0" title="Terraform HCL Formatter"></iframe>