JSON to TOML
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
JSON to TOML Converter
Turn JSON into TOML, the config format used by Rust's Cargo, Python's pyproject.toml and many tools, or switch direction to read TOML as JSON.
Example: writing a pyproject.toml
Python project settings kept as JSON, with nested tool settings and one null. Nested objects become [table] headers with dotted names, and the null is left out because TOML has no null:
Input
{
"project": {
"name": "bracely-tools",
"version": "1.2.0",
"requires-python": ">=3.10",
"dependencies": [
"httpx>=0.27",
"pydantic>=2"
]
},
"tool": {
"ruff": {
"line-length": 100,
"lint": {
"select": [
"E",
"F"
]
}
}
},
"license": null
}Output
[project]
name = "bracely-tools"
version = "1.2.0"
requires-python = ">=3.10"
dependencies = ["httpx>=0.27", "pydantic>=2"]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["E", "F"]
How do I use the JSON to TOML?
- Paste JSON, or choose TOML → JSON and paste TOML.
- The result appears in the Output box.
- Copy it or save it as a file.
What does the JSON to TOML do?
- Both directions
- Tables and arrays of tables written properly
- Opens .toml files directly
When to use the JSON to TOML
TOML is easier to read and edit by hand than JSON, which is why Cargo, pyproject.toml, Hugo and many tools use it for configuration. Convert JSON to TOML when you're moving settings from a JSON file or an API into one of those files, or generating config from code.
Nested objects become [table] headers with dotted names such as [tool.ruff.lint], simple arrays stay inline, and arrays of objects become [[table]] blocks. TOML has no null, so keys whose value is null are left out, and Bracely tells you how many. The top level has to be an object, because a TOML file is always a table.
Frequently asked questions
- Why are some keys missing from the TOML?
- Their value was null, and TOML has no null. The note under the output says how many were left out; give them a real value in the JSON if they must be in the file.
- Why do I get "TOML needs an object at the top level"?
- A TOML file is a table of keys, so it can't be a bare array or value. Wrap the data in an object, such as {"items": […]}.
- What happens to null values?
- TOML has no null, so keys with null values are left out.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has 108 JSON tools in one page. Related ones:
- TOML to JSON
- JSON Lines / NDJSON
- JSON5 / JSONC to JSON
- JSON to SQL
- JSON to Markdown table
- JSON to HTML table
- JSON to query string
- JSON to plain text
- cURL to JSON
- Postman collection viewer
- BSON to JSON
- Number base converter
- Colour converter
- ENV ⇄ JSON
- JSON to Pydantic
- JSON to TypeBox
- Remove nulls from JSON
- List tools
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram