---
title: "JSON TOML Converter"
description: "Convert a JSON object to TOML 1.0 or TOML back to JSON in your browser. Tables, arrays of tables and inline arrays handled; nulls dropped or emptied, your choice."
url: https://findutils.com/developers/json-toml-converter/
category: developers
---

# JSON TOML Converter

Convert a JSON object to TOML 1.0 or TOML back to JSON in your browser. Tables, arrays of tables and inline arrays handled; nulls dropped or emptied, your choice.

**Use this tool:** [JSON TOML Converter](https://findutils.com/developers/json-toml-converter/)

## Programmatic access

- Browser-only: this tool works on a file, the DOM, or a browser API and has no REST or MCP id.

## Why convert JSON to TOML in the browser?

Cargo.toml, pyproject.toml, Hugo and Zola configs, and a growing set of tool configs are TOML, and the data that feeds them usually arrives as JSON from a script or an API. Rewriting nested JSON into [tables] and [[arrays of tables]] by hand is slow and easy to get wrong, and the alternative is installing a CLI for a one-off job. This page converts both ways in the tab with a TOML 1.0 library. Objects become tables, arrays of objects become arrays of tables, scalar arrays stay inline. TOML has no null, so you choose whether a null key is dropped or written as an empty string, and the page lists the keys it changed.

## Frequently Asked Questions

### What happens to null values?

TOML has no null. With Nulls set to Drop, the key is left out; with Empty string, it is written as "". The keys that changed are listed under Notes either way, including nulls inside arrays.

### Why does it say the JSON root must be an object?

A TOML document is a table of keys, so a JSON array or a bare value has nowhere to go. Wrap the array in an object, for example {"items": [...]}, and it becomes an inline array or an array of tables.

### How are arrays of objects written?

As arrays of tables: each element becomes a [[name]] block in order. Arrays of scalars stay inline, such as ports = [ 8000, 8001 ]. A mixed array is written inline, which TOML 1.0 allows.

### Are dates converted?

TOML to JSON turns a TOML datetime into an ISO string, keeping a local date as a date and a local time as a time rather than inventing a timezone. JSON to TOML leaves every string as a string, even one that looks like a date, because guessing would change the type silently.

### Is the conversion lossless?

For a null-free JSON object, yes: converting to TOML and back returns the same data. Nulls and datetimes are the two places the formats differ, and the page reports what it changed.

### Which TOML version is supported?

TOML 1.0, including inline tables, dotted keys, multi-line strings, and all four datetime forms. Older converters that stop at 0.4 or 0.5 reject some of these.

### Is my config uploaded?

No. Parsing and writing happen in your browser, and no request carries the text. Third-party analytics and ads may load on the page, as on the rest of the site.

### Can it validate a Cargo.toml or pyproject.toml?

It validates TOML syntax and reports the line and column of an error. It does not know the schema of any particular tool, so a valid TOML file with a misspelled section still passes. Use the tool's own commands for that.

### What does Sort keys do?

It orders keys alphabetically in every table before writing TOML. Leave it off to keep the input order, which is what you usually want when the JSON was written by hand.

### Is there a REST or MCP version?

Not yet. The page is browser-only. The JSON YAML Converter has both surfaces; extending them to TOML is a separate decision.

## Related Tools

- [JSON YAML Converter](https://findutils.com/developers/json-yaml-converter/)
- [YAML Validator](https://findutils.com/developers/yaml-validator/)
- [JSON Formatter](https://findutils.com/developers/json-formatter/)
- [Env JSON Converter](https://findutils.com/developers/env-json-converter/)
- [Properties JSON Converter](https://findutils.com/developers/properties-json-converter/)
- [JSON to XML](https://findutils.com/convert/json-to-xml/)
