# toml (BurntSushi)

> Decode and encode TOML in Go, like encoding/json

Source: https://talira.ai/catalog/toml-burntsushi-0w973zf2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Command-line tool
- Categories: [developer tools / parsing / toml](https://talira.ai/categories/developer-tools/parsing/toml), [developer tools / programming languages / configuration](https://talira.ai/categories/developer-tools/programming-languages/configuration)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Supports: [TOML](https://talira.ai/standards/toml.md)[^2]
- Backed by: [Andrew Gallant](https://talira.ai/orgs/andrew-gallant.md)

github.com/BurntSushi/toml is the widely used Go package for reading and writing TOML files, compatible with TOML v1.1.0. It works by reflection like Go's standard `encoding/json`: `toml.Decode` fills a struct from a TOML document, an encoder writes one back, and its metadata reports keys the document had that the struct didn't. Types can decode themselves through `encoding.TextUnmarshaler`. It also ships `tomlv`, a command that validates TOML files.

## Links

- GitHub: https://github.com/BurntSushi/toml
- Docs: https://pkg.go.dev/github.com/BurntSushi/toml

## Problems it solves

- read a TOML config file into a Go struct
- write a Go struct out as a TOML file
- validate a TOML file from the command line

## Features

- decode TOML into Go structs with toml.Decode, by reflection
- encode Go values as TOML
- report keys the struct didn't decode
- compatible with TOML v1.1.0
- tomlv command to validate TOML files

## Trust

Overall: 0.47 out of 1.
Signals: maintenance 0.45, adoption 0.74, momentum 0.45, community 0.72, backing 0.30, extensibility 0.00.

- last commit 3 months ago
- latest release v1.6.0 11 months ago
- 5.0k GitHub stars
- 62 contributors
- accepts sponsorship (Github)
- backed by Andrew Gallant

## Alternatives

- [go-toml](https://talira.ai/catalog/go-toml-zzk1bxz2.md): Read and write TOML 1.1 in Go, with an encoding/json-style API

## Sources

[^1]: https://github.com/BurntSushi/toml/blob/master/COPYING (checked 27 Nov 2026)
[^2]: https://github.com/BurntSushi/toml/blob/master/README.md (checked 29 Nov 2026)
