Nested JSON objects become TOML tables, arrays of strings or numbers become TOML arrays, and arrays of objects become arrays of tables. Date-looking JSON strings remain strings because JSON has no native date type. Optional alphabetical key sorting applies recursively to nested objects.
TOML has no null type. This converter omits object fields whose value is null: {"keep":1,"missing":null} produces only keep = 1. Check the source and output before using the converted configuration, and decide how those missing values should be represented for your application.
Common questions and answers about this topic.
JSON uses curly braces and strict quoting rules, while TOML uses a flat key-value syntax with sections (tables). TOML supports comments, native date/time types, and is designed to be more human-readable for configuration files.
TOML is used for Rust's Cargo.toml, Python's pyproject.toml, Hugo site configuration, and many CLI tools. This converter changes data syntax only: it does not turn package.json into a working Cargo.toml or pyproject.toml, rename fields, or build the project structure those tools require. Prepare and check the required keys and tables yourself.
Yes, the sort keys dropdown allows you to alphabetically order all TOML table keys (A to Z) or retain the original sequence from your JSON. Sorting applies recursively across all nested TOML tables and sub-tables.
No, the JSON-to-TOML conversion is performed entirely in your browser using JavaScript. Your JSON data stays on your device and is never uploaded to any server.