Format HCL with a real tokeniser and explore its block structure. Heredocs, interpolation and comments are handled rather than mangled by a line-based pass.
Waiting for HCL
A real tokeniser: heredocs, interpolation and comments are all handled.
The formatted HCL appears here
Heredoc bodies are never touched, and an interpolated expression keeps its own spacing.
This is formatting and structural inspection, not validation. It does not evaluate an expression, does not know any provider schema, and cannot tell you whether a resource type exists. terraform fmt is the canonical formatter and its output is what your CI checks — this is useful when you do not have Terraform to hand, and it does not claim to match byte for byte. Heredoc bodies and interpolated expressions are left exactly as you wrote them.
HCL Formatter runs entirely on your device — no Terraform command is run and nothing is uploaded.
You’re on the Free plan. Compare plans
This is a tokeniser, not a line matcher, and that is the whole point. HCL has heredocs whose bodies must not be touched, `${}` interpolation that can contain nested braces and quoted strings, expressions spanning lines inside brackets, three comment syntaxes, and a `#` that is just a character inside a string.
Every one of those breaks a regex-based formatter, and the usual symptom is a re-indented policy document — the heredoc body gets treated as code and comes out wrong in a way that is hard to spot and changes what the configuration means.
Aligned equals signs are optional and on by default, because that is what `terraform fmt` does: it aligns consecutive single-line attributes and breaks the run at a blank line or a nested block, which is what makes the alignment meaningful rather than arbitrary.
The structure view shows the block tree the parser actually built — every block with its type, its labels, its attribute names and its nesting. That is useful on its own for understanding an unfamiliar configuration, and it is the honest answer to "did the parser read this the way I meant it".
What it will not claim: this is formatting and structural inspection, not validation. It does not evaluate expressions, knows no provider schema, and cannot tell you whether a resource type exists. `terraform fmt` is the canonical formatter and its output is what your CI checks — this is for when you do not have Terraform to hand.
It follows the same conventions — two-space indent, aligned runs of single-line attributes broken at blank lines and nested blocks — but it does not claim byte-for-byte equivalence, because only Terraform's own formatter defines that. Use this when Terraform is not to hand and `terraform fmt` when it is.
No. A heredoc body is captured whole and emitted unchanged, which is the main reason this tokenises rather than working line by line. A formatter that re-indents an embedded policy document has changed the document.
It reports constructs it could not parse, which catches unbalanced braces and unterminated strings. It does not validate against any schema, so an argument that does not exist on a resource will format perfectly and fail at plan time.