Report

Help us improve this tool

JSON to HCL Converter

Turn JSON objects into HashiCorp HCL configuration blocks and attributes in your browser.

O M T

Convert JSON to HashiCorp HCL

Terraform and other HashiCorp tools use HCL blocks and attribute assignments. Paste JSON produced from APIs or exporters and get HCL-style configuration with blocks for repeated nested objects.

Need the opposite direction? Use the HCL to JSON Converter or the HCL to YAML Converter. Validate JSON first with the JSON Validator.

Frequently Asked Questions

How are JSON arrays converted to HCL blocks?

When a JSON value is an array of objects, each entry becomes its own HCL block with the same block name. Scalar arrays stay as HCL list expressions.

Is every HCL language feature supported?

This tool focuses on attributes, inline objects, lists, and labeled blocks that round-trip with our HCL parser. Advanced Terraform-only expressions are not generated.

Where does conversion run?

Entirely in your browser. Your JSON never leaves the page.