toml2json
A command-line tool that converts TOML to JSON. Nothing more, nothing less.
Installation
Cargo
cargo install toml2json
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.
uvx toml2json
uv tool install toml2json
pipx install toml2json
# or pip install, if you're in a virtual environment
Homebrew
toml2json is available via Homebrew:
brew install toml2json
Alpine Linux
toml2json is available for Alpine Edge. It can be installed via apk after enabling the testing repository.
apk add toml2json
Arch Linux
If you're using Arch Linux, you can install toml2json using an AUR helper. For example:
paru -S toml2json
Debian/Ubuntu
toml2json is available since Debian 13 Trixie and Ubuntu 25.04, packaged as rust-toml2json.
apt install 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:
$ toml2json <<< 'wow = "amazing"' | jq
Produces:
{
"wow": "amazing"
}
Convert TOML from a file and pretty-print it without jq:
$ toml2json --pretty ~/.config/kbs2/kbs2.conf
Produces:
{
"age-backend": "RageLib",
"error-hook": "~/.config/kbs2/hooks/error-hook-notify",
"keyfile": "REDACTED-GO-AWAY",
"public-key": "REDACTED-GO-AWAY",
"reentrant-hooks": false,
"store": "~/.kbs2-store",
"wrapped": true,
"generators": [
{
"alphabet": "abcdefghijklmnopqrstuvwxyz0123456789(){}[]-_+=",
"length": 16,
"name": "default"
}
],
"commands": {
"edit": {
"editor": "subl -w",
"post-hook": "~/.config/kbs2/hooks/push-repo"
},
"new": {
"generate-on-empty": true,
"post-hook": "~/.config/kbs2/hooks/push-repo"
},
"pass": {
"clear-after": true,
"clear-hook": "~/.config/kbs2/hooks/pass-clear-notify",
"clipboard-duration": 10,
"x11-clipboard": "Clipboard"
},
"rm": {
"post-hook": "~/.config/kbs2/hooks/push-repo"
}
}
}
Amazing. What more could you want? Hopefully nothing, because it will never do anything else.
Release files for toml2json 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toml2json-1.4.0.tar.gz | 10.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| toml2json-1.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| toml2json-1.4.0-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl | Python 3 | none | Linux musl 1.2+ ARMv7l | Details |
| toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl | Python 3 | none | Linux musl 1.2+ ARM64 | Details |
| toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl | Python 3 | none | Linux glibc 2.28+ ARMv7l | Details |
| toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl | Python 3 | none | Linux glibc 2.24+ ARM64 | Details |
| toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 4.9 MB
Release files / toml2json-1.4.0.tar.gz
| Download URL | toml2json-1.4.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe64f745403f8b246ee0d554ef5fb5708267c8833d45725f2223bf536f869650
|
|
BLAKE2b-256 checksum How to use checksums |
a4c15c3182c81a5d71443bc202a33e9de084f14bd232d31865b9a4190f28daed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-win_amd64.whl
| Download URL | toml2json-1.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 403.9 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b690fedb864725a50b16b362be3620962ff1ab1c2c385fa6440c7aa57ee0f1c5
|
|
BLAKE2b-256 checksum How to use checksums |
37f5faaa742264b18479762100c8bd15919faf254454d0a770f9fc981b2c8a53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-win32.whl
| Download URL | toml2json-1.4.0-py3-none-win32.whl |
|---|---|
| Size | 373.9 kB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
54dab7f486ad27903600f5a4c04252180639b21d25ec0591cfd9b1c5363f1321
|
|
BLAKE2b-256 checksum How to use checksums |
dd6c8ababdeb81e734094e689d01b95a3cc3174dd056e28443511e3fc93297f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 563.0 kB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
9bd36115a563c44a5825c58fa1dd1cf342a20a4e96e1a70fdf02d75ee20aee2d
|
|
BLAKE2b-256 checksum How to use checksums |
5368717fb3013157fe344d6838371ffffb88c520efb2afdb74072080e2100f6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl
| Download URL | toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 538.3 kB |
| Tags | Linux musl 1.2+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
3fc3f812220008d600650412d538d2ed0f4c23657358e14bc882f3061f6b2f93
|
|
BLAKE2b-256 checksum How to use checksums |
16f2e1961b921d275d920c0ffd0e1dbf392ebc667d85e3b25317b7cf15bc815a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 541.9 kB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
42fbf06c88a8c3b14a5e06ae72bcc81f3694411993a568d167f574e483fd5786
|
|
BLAKE2b-256 checksum How to use checksums |
9389a0153b332dab45b974a5de8aabf08be3490ab426fe19356bf12b31cc6527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 514.8 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
01782568a9b1f7a8858cabb808e05c2cdeae36cb1bd37ec517e9ebf98f00ec98
|
|
BLAKE2b-256 checksum How to use checksums |
f5b35de37522d29fe8467b3d7235f7876c4b3d088df19f6b7b7890b1ff6a6d90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl
| Download URL | toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl |
|---|---|
| Size | 513.5 kB |
| Tags | Linux glibc 2.28+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
59bcdcce91aaaa7475b91d409071f0808d656ada76924b88e6a9f8a363a74902
|
|
BLAKE2b-256 checksum How to use checksums |
6054d127fcd25cf761a3d72f6bfa1981bbd2f10f808d57072898a29eb375a9fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl
| Download URL | toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl |
|---|---|
| Size | 497.1 kB |
| Tags | Linux glibc 2.24+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
5c434cbc0ca625d1f6e363d851e809736b5e6170069da2c3bcca8ceea2a1b8c1
|
|
BLAKE2b-256 checksum How to use checksums |
de20d44de51f753846c25844936fcb89340506ed3aaf53c1a0c98f1c9e5d113b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 471.5 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a703dc6b37e2f0d9046ac0883bca2c672b5436f2b33e662547f08b973f46136f
|
|
BLAKE2b-256 checksum How to use checksums |
1d10e3faaaa8b26dc3f72ada9e22b0222d26a37cc7a9bb2f19cb7ef30a3a792b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|
Release files / toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 494.2 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
50fbb146d3eaaef784d62e57ab4188ed1770b633c8b0d13476823140ff0f8c6f
|
|
BLAKE2b-256 checksum How to use checksums |
55669f4cb9df5656e3ff3991c0eca8724076bb1ae7067c2d3588d6ff81a70a42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
maturin/1.11.5
|