# JSON to TOML Converter

URL: https://phishdestroy.io/developer-tools/json-to-toml
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Convert a JSON configuration into TOML, the format of Cargo.toml, pyproject.toml and many other tools.

## Example input

Server config

```
{"title":"Report feed","server":{"host":"127.0.0.1","port":8080,"tls":true},"tags":["web","api"],"owners":[{"name":"alice"},{"name":"bob"}]}
```

title and tags = ["web", "api"] at the top, then a [server] table and two [[owners]] entries.

## FAQ

### How are JSON types mapped to TOML?

Strings, numbers and booleans become TOML values, objects become [section] tables with dotted names for nesting, arrays of objects become [[array]] tables and other arrays are written inline. The input must be valid JSON; otherwise the parser error is shown.

### What does not convert cleanly?

null becomes an empty string because TOML has no null, keys are written without quotes so keys with spaces or dots need quotes added by hand, line breaks inside strings are not escaped, and arrays of arrays are written as tables. Run such results through a TOML validator.

### Is the JSON sent to a server?

No. Parsing and conversion run in your browser, and nothing is uploaded.

## Related tools

- [TOML to JSON Converter](https://phishdestroy.io/developer-tools/toml-to-json)
- [YAML to TOML Converter](https://phishdestroy.io/developer-tools/yaml-to-toml)
- [TOML to YAML Converter](https://phishdestroy.io/developer-tools/toml-to-yaml)
- [JSON Formatter](https://phishdestroy.io/developer-tools/json-formatter)
- [JSON ↔ YAML Converter](https://phishdestroy.io/developer-tools/json-yaml-converter)

All tools: https://phishdestroy.io/developer-tools
