Tools for converting between various data formats
Updates
Recently shipped improvements
Automatically convert TOML config files to TypeScript interfaces or types.
Useful for generating types from Cargo.toml, pyproject.toml and other TOML configs.
Automatic TOML syntax parsing
Table section handling
Array of tables support
Automatic nested table separation
Use meaningful root names like Config for config files
Enable readonly option for config files
Great for Rust/Python project config type generation
A tool that automatically converts TOML (Tom's Obvious Minimal Language) configuration files to TypeScript interfaces or types. Analyzes various TOML file structures such as Cargo.toml (Rust), pyproject.toml (Python), and database configs to generate type-safe configuration management code.
Enter TOML
Enter TOML in the left editor or load a sample such as Cargo.toml or pyproject.toml.
Set the Options
Set the root interface name (such as Config), output format, export option, and readonly option.
Review and Copy the Result
Review the converted TypeScript code in the right editor, then copy it or download a .ts file.
A TOML table becomes a nested object. A [database] section becomes a database property, and the section's key-value pairs generate a separate interface.
A TOML array of tables such as [[products]] becomes an array type. The tool analyzes the structure of each table entry and generates a type such as Products[].
TOML natively supports date, time, and date-time types, but TypeScript represents them as Date or string. Additional processing may be required to create Date objects during actual parsing.
It provides type safety when a Node.js tool or build script parses Cargo.toml to manage a Rust project. It is useful in monorepo tooling, CI/CD pipelines, and similar workflows.
An inline table (key = {a = 1, b = 2}) and a standard table ([key]) represent the same TOML structure and produce the same result. Use an inline table for a compact single line and a standard table for a multiline definition.