TOML Editor & Converter
Parse, validate, and convert TOML to JSON/YAML and back. Built-in TOML parser — no server required.
What Is TOML and Why Convert It?
TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read and write. It maps clearly to a hash table and is used by tools like Cargo (Rust's package manager), Python's pyproject.toml, Hugo static site generator, and many other projects that need human-friendly configuration files.
While TOML is great for configuration, developers often need to convert between TOML, JSON, and YAML — for example, when migrating configurations between tools, when an API expects JSON but your config is in TOML, or when you need to transform data between different parts of a pipeline. Each format has strengths: TOML for configuration, JSON for APIs and data interchange, YAML for Kubernetes manifests and CI/CD pipelines.
This TOML editor parses, validates, formats, and converts TOML to JSON and YAML — and converts JSON back to TOML. It includes a built-in TOML parser that handles the full TOML spec including arrays of tables, inline tables, datetime types, and comments. It also features an interactive tree view for exploring complex configurations. All processing happens in your browser with no server involved.
How to Use the TOML Editor & Converter
- Choose your input mode — Select "TOML → JSON/YAML" to convert from TOML, or "JSON → TOML" to convert from JSON to TOML format.
- Paste or edit your data — Enter your TOML or JSON in the left editor. The tool validates your input in real-time, showing a green "Valid" badge or a detailed error message with the line number.
- View the conversion output — Switch between output tabs to see your data as JSON, YAML, formatted TOML, or an interactive tree view. Each tab has a copy button for easy clipboard access.
- Format your input — Click "Format" to auto-format your TOML or JSON input with consistent indentation and spacing, preserving comments in TOML.
- Explore with the tree view — Use the Tree tab to visually navigate nested structures. Each node shows its type (string, number, boolean, array, DateTime) and value.
Key Features
- Full TOML spec support — Handles tables, arrays of tables (
[[array]]), inline tables, dotted keys, multi-line strings, datetime types, hex/octal/binary numbers, and special float values (inf, nan). - Comment preservation — Unlike most converters, this tool preserves TOML comments when formatting. Preceding comments and inline comments are maintained in the formatted output.
- Bidirectional conversion — Convert TOML to JSON, TOML to YAML, or JSON back to TOML. Switch between modes with one click.
- Interactive tree view — Expand and collapse nested objects and arrays. Each node displays its type with color coding: strings in green, numbers in blue, booleans in yellow, DateTimes in purple.
- Real-time validation — Instant error detection with line-number references so you can quickly fix syntax issues.
- 100% client-side — Built-in TOML parser runs entirely in your browser. No server, no uploads, no external dependencies.
Common Use Cases
- Rust/Cargo configuration — Edit and validate Cargo.toml files, convert them to JSON for programmatic processing, or compare structures across projects.
- Python project setup — Work with pyproject.toml files for Python packaging (PEP 621), converting between TOML and JSON when tools require different formats.
- Hugo site configuration — Edit Hugo's config.toml, convert it to YAML for comparison with other static site generators, or validate syntax before deploying.
- CI/CD pipeline configuration — Convert between TOML and YAML when migrating configurations between different CI/CD systems.
- Learning TOML syntax — Use the tree view and JSON output to understand how TOML structures map to data types, especially for arrays of tables and nested configurations.
Frequently Asked Questions
🔒 This tool runs entirely in your browser. No data is sent to any server.