Terraform HCL Formatter
Format Terraform configuration files.Runs in this tab.⌘ ↵ runs it
Next step
AtriumKitFrom the team behind browserutils
Turn a click-through into an interactive demo
AtriumKit records your web app once in Chrome and turns every click into a step of a demo you can embed or share. There’s a free plan.
Try AtriumKit freeAbout Terraform HCL Formatter
Free online Terraform HCL formatter. Format Terraform configuration files with terraform fmt-style indentation and alignment. It runs in your browser. Nothing is sent to a server.
Questions
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.
Can I format OpenTofu or Terragrunt files with this tool?
Yes, since OpenTofu and Terragrunt use HCL syntax, this formatter works with their configuration files as well.
Does the Terraform formatter require Terraform to be installed?
No, the formatter runs entirely in your browser. You do not need the Terraform CLI installed to format HCL configuration files here.
Comments
More in Formatters & Beautifiers
- HTML Formatter
- CSS Formatter
- JavaScript Formatter
- SQL Formatter
- XML Formatter
- Markdown Preview
- CSS Minifier
- HTML Minifier
Comments