TOML tools
Format, validate, lint, and round-trip TOML against JSON, YAML, CSV, XML, and .properties — then generate the Go, Rust, or Python types that read it. 36 tools, all running in your browser. Your text never leaves the page.
Inspect
Formatter →
Canonical spacing, quoting, and table layout. Re-emits the parsed tree.
Validator →
Pin syntax errors to the exact line and column. Shows normalized structure.
Diff →
Compare two TOML files semantically — ignores whitespace and key order.
Lockfile diff →
Cargo.lock / poetry.lock / uv.lock compared by package name — upgraded, added, removed, in one screen.
Merge →
Combine a base TOML with an overlay. Deep-merge tables; pick a conflict and array policy.
Linter →
Key casing, needless quotes, mixed arrays, stray secrets — the things a valid file still gets wrong.
requirements.txt to pyproject →
pip requirements as a PEP 621 dependencies array — markers and extras kept, pip flags explained.
pyproject.toml validator →
PEP 621 metadata, PEP 440 versions, PEP 508 dependencies — the schema on top of the syntax.
Cargo.toml validator →
Editions, SemVer, version requirements, feature cycles, workspace inheritance, profiles.
Query by path →
Read one value or table by dotted path. Returns TOML or JSON.
Key lister →
Every key path in the file, as a list, JSON, or CSV — with a prefix filter.
Stats →
Keys, tables, nesting depth, type histogram, longest path, biggest array.
Convert
TOML→JSON →
Tables and arrays into clean JSON. Preserves types verbatim.
JSON→TOML →
Readable TOML out of a JSON object, with hierarchies intact.
TOML→YAML →
YAML 1.2 output, for cross-format config workflows.
YAML→TOML →
Migrate back without surprises — same types, same shape.
INI→TOML →
Migrate legacy INI configs. Dotted sections become nested tables.
TOML→INI →
Backport TOML to a classic INI file for legacy systems.
.env→TOML →
Build a structured config from environment variables. __ nests.
TOML→.env →
Flatten a TOML config to KEY=VALUE pairs for Docker and 12-factor apps.
TOML→TypeScript →
Emit typed .d.ts interfaces matching the shape of your config.
TOML→CSV →
A key/value sheet, or one row per [[entry]] with a column per field.
CSV→TOML →
Spreadsheet rows into an array of tables, with types inferred per cell.
TOML→XML →
Elements or attributes, wrapper or repeated arrays, your choice of root tag.
TOML→.properties →
Dotted keys a Java Properties loader reads, escaped correctly.
.properties→TOML →
Re-nest dotted keys into tables and put the types back.
Generate code
Go structs →
Nested structs with toml: tags, slices, time.Time, optional pointers.
Rust structs →
serde derives, Vec<T>, Option for absent fields, rename attributes.
Python types →
TypedDict, dataclasses, or pydantic models — children declared first.
JSON Schema →
Infer a draft 2020-12 schema from a working config, ready for CI validation.
Transform
Sort keys →
Alphabetise keys inside every table for reproducible diffs and quick lookup.
Flatten →
Convert nested tables to dotted-key form, one assignment per line.
Minify →
Compact a TOML file: inline small tables, strip blank lines. Output stays valid TOML.
Unflatten →
Dotted keys back into nested tables; indexed keys back into arrays.
Redact secrets →
Mask passwords, tokens, and API keys before sharing a config.
- What is TOML — plain-English reference: types, ecosystem, and how it compares to JSON and YAML.
- Sample datasets — real
Cargo.toml,pyproject.toml, and intentionally-broken files for testing.
Converting between formats
If you need to pipe your config into a web service or another tool, the TOML → JSON converter turns your tables and arrays into clean JSON without sending a single byte to a server. Going the other way, the JSON → TOML converter creates a readable TOML structure from a JSON object while keeping your data hierarchies intact. For mapping between different config styles, the TOML → YAML converter handles YAML 1.2 output, and the YAML → TOML converter helps you migrate back to TOML with zero friction.
Cleaning and checking your TOML
To keep your config files consistent, the
TOML Formatter
applies canonical spacing, standardized quoting, and a logical table layout to your documents.
If you are hunting for a syntax error, the
TOML Validator
identifies the exact line and column where your TOML failed to parse and shows you a normalized structure once it is valid.
Generating types and schemas
Once a config file works, the next job is usually the code that loads it. The
Go struct generator writes nested structs with the
toml: tags already correct — the detail hand-written structs most often get wrong — while the
Rust struct generator emits serde types with
rename attributes for hyphenated keys and Option for fields that only some entries carry. For Python, the
Python type generator produces a TypedDict that type-checks a
tomllib.load() result, or dataclasses and pydantic models if you would rather have objects. And when you want CI to
reject a bad config rather than a type checker to describe a good one, the
JSON Schema generator infers a draft 2020-12 schema from a file that already works.
Auditing a config you did not write
For an unfamiliar file, start with the key lister to see every path it defines, then query the handful of values you actually care about instead of scrolling. The stats tool answers whether the file is as complex as it feels — depth, key counts, the type histogram — and the linter reports the things a valid file can still get wrong: inconsistent key casing, needless quoting, sections that interleave, arrays with mixed types, and credentials sitting in plain text. If you need to share that file, redact it first.
What they have in common
Everything runs in your browser. The text you paste never leaves your machine because there is no server-side component handling your data. I can't see your configuration because it was never sent to me, which means no size caps and nothing for me to accidentally leak.
Sensible defaults, no surprises. These tools aim for a "least astonishment" approach where your types and values stay exactly as you wrote them. Nothing gets silently transformed or "helpfully" changed without you asking.
Free to use. Bug reports and feature requests are always welcome — drop me a line at [email protected].
— S., [email protected]