# JSON to TOML Guide

Convert JSON documents to TOML.

- Tool: https://ilham.dev/tools/json-to-toml/
- Guide URL: https://ilham.dev/guides/json-to-toml/
- Tool guides index: https://ilham.dev/guides/tools/
- Broader guide: Working With Structured Data (https://ilham.dev/guides/working-with-structured-data/)

## What it does

Convert JSON to TOML, mapping objects to tables and arrays of tables to the TOML equivalent. Useful for turning an API response into a config file.

## Use the tool

Open https://ilham.dev/tools/json-to-toml/, add the input the tool asks for, run it, and check the output before using it elsewhere.

## Input and output

- Input: text.
- Output: text.
- Category: Formats.

## Privacy and processing
Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

## Questions

### Why is a nested structure sometimes rejected?

TOML requires that a table is fully defined before it is extended. A document that is legal JSON can therefore be inexpressible in TOML without restructuring, and the tool says so rather than emitting something invalid.