Report

Help us improve this tool

HCL to JSON Converter

Parse HashiCorp HCL configuration into formatted JSON for Terraform and infrastructure automation workflows.

O M T

Why convert HCL to JSON?

HashiCorp Configuration Language (HCL) powers Terraform, Nomad, and related tooling. Converting snippets to JSON helps you diff configs, feed values into APIs, or inspect nested blocks in a familiar format.

For environment-variable style output, see the JSON to ENV Converter. To flatten JSON objects, use JSON Unflatten.

Frequently Asked Questions

Does this validate Terraform modules?

No. Parsing is syntactic only; provider schemas and remote state are not evaluated.

How are multiple top-level blocks handled?

Each parsed block is preserved. A single block becomes a JSON object; several blocks become a JSON array of objects.