macOS
brew install json2hcllocal Homebrew formula metadata
brew
Convert JSON to HCL, and vice versa. Version 0.2.0 via Homebrew; verified 2026-05-19.
install
brew install json2hcllocal Homebrew formula metadata
nix profile install nixpkgs#json2hclnixpkgs package indexes · pkgs/by-name/js/json2hcl/package.nix · source: api.github.com
overview
Convert JSON to HCL, and vice versa
history
json2hcl is a small Go command-line converter for moving data between JSON and HashiCorp Configuration Language. Its niche is the Terraform-era need to translate machine-friendly JSON into a more readable HCL form without building a larger configuration system.
Kevin van Zonneveld published json2hcl in September 2016 around a workflow for an internal tool named Frey. The README says the authors wanted to store infrastructure recipes as HCL after converting from machine-readable JSON, YAML, or TOML, and it explicitly notes that the tool used existing HashiCorp libraries rather than inventing a parser.
The project soon added reverse conversion with the `-reverse` flag, exposing hcl2json behavior through the same executable. By June 25, 2025, the GitHub repository was archived; its README states that the original author no longer used it, while leaving the code available for forks.
Adoption appears to have been modest but durable in package-manager terms: the tool was packaged by Homebrew and Nix, and the repository accumulated hundreds of stars and forks before archival. Its presence in Homebrew reflects the small-CLI pattern where a narrow converter remains useful even after upstream development slows.
The canonical usage is Unix-pipeline oriented: feed JSON on standard input and receive HCL on standard output, or pass `-reverse` to convert HCL back to JSON. The README examples focus on Terraform-like `.tf.json` input and redirection to `.tf` files.
json2hcl is interesting because it captures a short period when HCL was becoming a preferred human-edited configuration language around HashiCorp tools, while JSON remained the common interchange format. For package collectors, it is a tiny bridge utility whose package-manager value is convenience rather than ecosystem size.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
json2hcl | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/kvz/json2hcl
install metadata
| Package key | brew:json2hcl |
|---|---|
| Version | 0.2.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/json2hcl |
| Homepage | https://github.com/kvz/json2hcl |
| Repository | https://github.com/kvz/json2hcl |
| Upstream docs | https://github.com/kvz/json2hcl#readme |
| License | MIT |
| Source archive | https://github.com/kvz/json2hcl/archive/refs/tags/v0.2.0.tar.gz |
| Last updated | 2026-05-19T07:48:50-04:00 |
| Pulse | updated |
| Build dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | json2hcl |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | yes |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
json2hcl
nix profile install nixpkgs#json2hclsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.