- What is TOML?
- TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read. It uses a simple key = value syntax with sections ([table]) for nesting. TOML is widely used for Rust (Cargo.toml), Python (pyproject.toml), and Hugo configuration files.
- When should I use TOML instead of JSON for configuration?
- TOML is more human-readable than JSON for configuration files: it supports comments, multiline strings, and a cleaner syntax without all the quotes. JSON is better for data interchange because it is universally supported. Use TOML for config files that humans edit, and JSON for API payloads.
- Can TOML represent everything JSON can?
- Almost. TOML supports strings, integers, floats, booleans, dates, arrays, and tables. It cannot natively represent null values (JSON null has no TOML equivalent), and mixed-type arrays have limited support. Simple nested objects and arrays convert cleanly in both directions.
- Is my data safe?
- All conversion runs in your browser using pure JavaScript (via the smol-toml library). No data is ever sent to a server. Your content stays completely private.
- What is pyproject.toml?
- pyproject.toml is the standard configuration file for Python projects, defined in PEP 518. It uses TOML to specify build system requirements, project metadata, and tool configuration (e.g. for Poetry, Hatch, or Ruff). You can paste its contents into this tool to convert it to JSON for inspection.