NetOpsT

Terraform HCL Formatter

Format Terraform and HCL snippets locally for easier review.

Runs locally

DEVELOPER / TERRAFORM

Terraform HCL Formatter

HCL formatting workspace

Readable indentation and consistent assignment spacing, in your browser.

FORMATTED OUTPUT
resource "aws_s3_bucket" "logs" {
  bucket = "company-logs"
  versioning {
    enabled = true
  }
}
Formatting noteThis is a local readability formatter, not a parser or validator. Use terraform fmt and terraform validate in the actual project before deployment.

Developer TOOL

Terraform HCL Formatter

Format Terraform and HCL snippets locally for easier review.

When to use this tool

Use it to make a Terraform configuration snippet readable before a code review.

Use it in three steps

  1. Paste HCL, copy the local formatting result, then run terraform fmt and validate in the repository.
  2. Review the calculated values against your environment and its requirements.
  3. Copy or document the result only after validating it for production use.

Related Developer tools