How to open a .hcl file
Quick, free ways to open HCL on any system.
A .hcl file is a HashiCorp Configuration Language File. If double-clicking does nothing, your computer simply does not have an app that reads HCL yet. Here is how to fix that on each operating system, using free software wherever possible.
Open a .hcl file step by step
- Confirm the file really is a .hcl. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
- On Windows, open it with VS Code (HCL extension) or any text editor.
- On Mac, use VS Code (HCL extension) or any text editor.
- On Linux, try VS Code (HCL extension) or any text editor.
- Still stuck? Convert the .hcl to json, which opens more widely.
Best apps to open .hcl files
Windows
- VS Code (HCL extension)
- any text editor
macOS
- VS Code (HCL extension)
- any text editor
Linux
- VS Code (HCL extension)
- any text editor
Frequently asked questions
Why can't I open my .hcl file?
Almost always because no installed app understands HCL. Install one of the apps above, or convert the file to a format your existing software already reads.
What uses .hcl files?
HashiCorp tools: Packer image builds, Nomad jobs, Consul and Vault configuration. Terraform uses the same language but names the files .tf.
Is HCL the same as JSON or YAML?
No, it is its own syntax with blocks and expressions, though every HCL file can be expressed in an equivalent JSON form. It is generally easier for humans to read than either.