All Tools View Categories About Contact Privacy

Terraform HCL to YAML Converter

Paste Terraform HCL and convert it to a YAML representation of its blocks.

Runs entirely in your browser - nothing is uploaded and no cloud connection is made.
Your converted YAML will appear here.

About Terraform HCL to YAML Converter

Sometimes a structured, language-neutral view of Terraform configuration is handy for tooling and review. The HCL to YAML Converter parses pasted .tf text and emits a YAML tree of blocks, labels, attributes and nested blocks.

Paste your HCL, convert, and export the YAML. Invalid HCL is reported clearly.

Features

  • Real parser - uses the shared tfParse engine.
  • Structured YAML - type, labels, attributes, nested blocks.
  • Validation - unbalanced braces and empty parses reported.
  • Correct quoting - YAML-safe string output.
  • Copy / Download / Print - export the YAML.

How to Use

  1. Paste .tf into the text area.
  2. Generate to convert to YAML.
  3. Fix any errors reported for invalid HCL.
  4. Export via copy, download or print.

Examples

Example - paste a resource block; get a YAML block with type, labels and attributes.

Benefits

  • Structured - machine-friendly YAML view.
  • Honest - invalid HCL is flagged.
  • Private - parsed entirely in the browser.
  • Portable - YAML works with many tools.

Frequently Asked Questions

What does this tool do?
It parses pasted Terraform HCL (.tf) and emits a YAML representation of the blocks: their type, labels, attributes and nested blocks.
How are invalid inputs handled?
Unbalanced braces and inputs that yield no parsed blocks are reported as errors in the error panel rather than producing bad output.
Does it round-trip back to HCL?
This tool only converts HCL to YAML. The YAML is a structured view of the configuration, not a lossless HCL source.
Are values preserved?
Attribute values are kept as parsed (strings, numbers, booleans, lists and maps) and written with correct YAML quoting.
Does this upload anything?
No. Everything is parsed in your browser and nothing leaves your machine.
Can I download the result?
Yes. Copy the YAML, download it, or print it.