toml2json
A command-line tool that converts TOML to JSON. Nothing more, nothing less.
Installation
Cargo
PyPI
NOTE: toml2json on PyPI was originally a pure Python CLI; ownership of the name on PyPI was transferred to woodruffw for this Rust-based CLI in August 2025. Versions prior to 0.1.0 on PyPI are the old pure Python version.
# or pip install, if you're in a virtual environment
Homebrew
toml2json is available via Homebrew:
Alpine Linux
toml2json is available for Alpine Edge. It can be installed via apk after enabling the testing repository.
Arch Linux
If you're using Arch Linux, you can install toml2json using an AUR helper. For example:
Debian/Ubuntu
toml2json is available since Debian 13 Trixie and Ubuntu 25.04, packaged as rust-toml2json.
Nixpkgs
nix-env --install toml2json
Please let us know if you package toml2json for another package manager or ecosystem!
Usage
Convert TOML on stdin to JSON, filtering it through jq:
|
Produces:
Convert TOML from a file and pretty-print it without jq:
Produces:
Amazing. What more could you want? Hopefully nothing, because it will never do anything else.