Bidirectional TOML ⇄ JSON Configuration Converter

Instantly convert between TOML and JSON configuration formats — right in your browser. No server, no tracking, no sign-up required. Whether you're migrating Cargo.toml to JSON for tooling, converting package.json settings to TOML, or debugging DevOps configurations, this tool handles it in milliseconds.

The conversion logic is written entirely in plain JavaScript with no external libraries — giving you complete transparency, privacy, and offline capability.

How to Use This Tool

  1. Paste your TOML or JSON — Enter TOML in the left panel or JSON in the right panel. A sample TOML configuration loads automatically so you can try the tool immediately.
  2. Click a conversion button — Use TOML → JSON to parse the left panel into JSON, or JSON → TOML to serialise the right panel into TOML output.
  3. Review the output — Check the status bar for success or error messages. Any syntax issues are highlighted with clear, line-specific error details.
  4. Copy the result — Click Copy Output to copy the last converted output to your clipboard, ready to paste into your project.

Key Benefits

  • Bi-directional conversion: Switch between TOML→JSON and JSON→TOML — no need for separate tools or complex CLI commands.
  • 100% private: All parsing and serialisation happens locally in your browser. Your config files never touch a server.
  • Real-world TOML support: Handles tables, arrays of tables, inline tables, dotted keys, multi-line strings, datetimes, and comments.
  • Clean TOML output: JSON→TOML generates readable, idiomatic TOML with proper table headers and formatting.

Common Use Cases

Rust / Cargo Projects

Convert Cargo.toml to JSON for programmatic analysis, dependency auditing, or integration with JSON-based tooling and CI pipelines.

Python Packaging

Work with pyproject.toml files — convert them to JSON for scripting, or generate TOML from existing JSON-based package metadata.

DevOps & Config Migration

Migrate configuration between systems that use TOML (Hugo, InfluxDB, Netlify) and those expecting JSON (VS Code settings, ESLint, npm). Ideal for DevOps format standardisation.

Go Applications

Many Go tools and libraries use TOML for configuration. Convert between TOML and JSON when interfacing with REST APIs, cloud services, or JSON-native toolchains.

Static Site Generators

Hugo, Zola, and other SSGs use TOML front matter and config files. Convert to JSON for data processing, theme development, or migration to JSON-based generators.

Data Exploration

Quickly inspect the structure of unfamiliar TOML config files by converting to JSON's familiar nested format — especially useful during code reviews and onboarding.

Understanding TOML vs JSON Formats

TOML (Tom's Obvious Minimal Language) was created by Tom Preston-Werner, co-founder of GitHub, as a configuration file format that maps unambiguously to a hash table. Unlike JSON, TOML supports comments, has a native datetime type, and uses [table] headers to reduce nesting verbosity. TOML is the default config format for Rust's Cargo, Python's pyproject.toml, Hugo static sites, and many other modern tools.

JSON (JavaScript Object Notation) is the most widely used data interchange format on the web. It is strict (no comments, no trailing commas), universally supported by programming languages, and ideal for APIs and machine-to-machine communication. JSON's simplicity makes it the backbone of RESTful APIs, configuration in Node.js ecosystems, and NoSQL databases like MongoDB and CouchDB.

When to choose TOML: Use TOML when humans will read and edit the file frequently — configuration files, project manifests, and settings files. TOML's comment support and intuitive table syntax make it easier to maintain over time.

When to choose JSON: Use JSON when the data is primarily consumed by machines — API payloads, inter-service communication, database documents, and any context where strict parsing rules and universal library support matter most.

Frequently Asked Questions

What is the difference between TOML and JSON?

TOML (Tom's Obvious Minimal Language) is designed to be a human-friendly configuration format with support for comments, tables, and datetime types. JSON (JavaScript Object Notation) is a lightweight data-interchange format that is strict and machine-friendly. TOML uses [table] headers and key = value syntax, while JSON uses braces, brackets, and quoted keys. TOML is commonly used in Rust (Cargo.toml), Python (pyproject.toml), and Go projects, while JSON dominates APIs, package manifests (package.json), and data exchange.

Is my configuration data sent to a server?

No. All parsing and conversion logic runs entirely in your browser using client-side JavaScript. Your TOML and JSON data never leaves your device — no server requests, no logging, no tracking. This makes the tool safe for sensitive configuration files including database credentials, API keys, and infrastructure secrets.

What TOML features does this parser support?

The parser supports all common TOML features: key-value pairs with strings (basic and literal), integers, floats, booleans, and datetime values; standard [table] and [[array of tables]] headers; dotted keys; inline tables and inline arrays; multi-line basic strings (triple quotes) and multi-line literal strings (triple single-quotes); comments (lines starting with #); and nested table hierarchies. It handles real-world config files like Cargo.toml, pyproject.toml, and Hugo config files.

Related Tools

Technical Notes

  • JSON parsing uses the native browser JSON.parse() for correctness
  • TOML parsing and JSON→TOML serialisation are written in pure JavaScript — no external libraries
  • Supports TOML v1.0 features: tables, array of tables, inline tables, dotted keys, multi-line strings
  • Datetime values are preserved as ISO 8601 strings in JSON output
  • JSON→TOML uses proper [table] headers for nested objects instead of inline notation
  • Works offline after the page is loaded — no internet required