TOML to JSON
Convert between TOML and JSON configuration formats
Input & options
Your inputs are never uploaded or stored.
Converted output
Enter content or load a sample to start.
About the TOML to JSON Converter
Our free TOML to JSON converter converts TOML to JSON and back, so configuration files can feed tools and APIs that only read JSON. For a Cargo.toml in a Rust project, a pyproject.toml in Python, or a Hugo site config, this tool translates your TOML tables and key-value pairs into clean JSON and back again.
TOML (Tom's Obvious, Minimal Language) was designed to be a human-friendly configuration format that maps unambiguously to a hash table. JSON, while less pleasant to write by hand, is the lingua franca of APIs and tooling. Developers and DevOps engineers often need to switch between the two when integrating config files with CI/CD systems, generating deployment manifests, or debugging application settings.
This converter preserves table structures, array-of-tables, inline arrays, and all TOML data types including strings, integers, floats, and booleans. Upload a file or paste content, review table and key counts, then download or copy the result. Your configuration data and secrets are never uploaded or stored.
Key Features
- Bidirectional TOML-to-JSON and JSON-to-TOML conversion
- Table and array-of-tables ([[table]]) parsing and generation
- Automatic data-type detection for strings, numbers, booleans, and arrays
- Comment-aware TOML parsing (comments are stripped cleanly)
- Nested dotted-key table support for deeply structured configs
- Conversion statistics showing input size, output size, tables, and keys
- File upload support for .toml, .json, and .txt files
- One-click download and copy-to-clipboard for the converted output
- Built-in sample configuration data for quick exploration
- Your data is never uploaded or stored
How to Use
- Choose the direction: Click "TOML to JSON" or "JSON to TOML" to set the conversion mode.
- Provide input: Paste your TOML or JSON content, upload a file, or click "Sample" to load example configuration data.
- Convert: Press the Convert button to generate the output instantly.
- Review statistics: Check input/output sizes and the number of tables and keys detected.
- Download or copy: Click "Download" to save as a .toml or .json file, or "Copy" to place the result on your clipboard.
Use Cases
- Rust development: Convert Cargo.toml dependencies and settings to JSON for build scripts or tooling integration.
- Python packaging: Transform pyproject.toml into JSON for use with package management APIs or CI/CD workflows.
- Hugo & static sites: Switch Hugo config.toml to JSON when deploying via platforms that prefer JSON configuration.
- DevOps automation: Generate JSON from TOML configs for Terraform, Ansible, or custom deployment tools.
- Configuration migration: Move settings between applications that use different configuration formats.
- API integration: Convert TOML-based app configs into JSON payloads for REST or GraphQL API calls.
- Debugging & diffing: Convert TOML to JSON for easier comparison using standard JSON diff tools.
Frequently Asked Questions
Does it preserve TOML comments?
TOML comments (lines starting with #) are recognized and cleanly stripped during conversion, since JSON does not support comments. All data values are preserved accurately.
Can it handle array-of-tables?
Yes. The converter fully supports TOML [[array-of-tables]] syntax, converting them to JSON arrays of objects and vice versa.
What TOML data types are supported?
The tool supports strings, integers, floats, booleans, arrays, tables, and inline tables. Date/time values are treated as strings in the JSON output.
Can I convert large configuration files?
Yes. You can upload files up to 5 MB or paste text of any length. Very large inputs take a little longer on slower devices.
Tips & Best Practices
- Quote ambiguous values: In TOML, always quote strings that could be misread as numbers or booleans to ensure correct type conversion.
- Use the sample data: Load the built-in sample to see how tables, arrays, and nested structures are represented in both formats.
- Check table and key counts: Use the statistics panel to verify the converter detected all sections and keys from your TOML file.
- Round-trip test: Convert TOML to JSON and back to TOML to confirm that no data is lost during the transformation.
- Redact secrets: Even though processing is local, strip sensitive values like passwords and API keys before sharing the converted output.