We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Quickly convert JSON data to TOML format. A free online tool perfect for migrating configuration files.
Enter JSON data to generate TOML.
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Paste valid JSON to see a TOML representation update as you type. JSON is often used to exchange structured data; TOML is commonly used for human-edited configuration. In TOML, a simple setting looks like enabled = true. A nested object can be represented by a table header such as [server], while a list of objects can use repeated array-of-table headers such as [[users]].
This is a text conversion, not a check that a particular application accepts the resulting configuration. Review the output against the keys and conventions expected by your target program.
For example, {"server":{"port":8080},"tags":["dev","test"]} becomes a [server] table with port = 8080, plus tags = ["dev", "test"]. An array containing objects is written as array tables; each object becomes a separate [[users]] block. A root value that is not an object, including a root array or string, is written as value = ....
Keys made of letters, digits, underscores, and hyphens can appear without quotes. Other key names are quoted. Strings, booleans, numbers, and arrays receive TOML-style notation.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Paste or type a complete JSON value into the input, or choose the example to load a sample with nested settings and users. The input must follow JSON syntax: keys and strings need double quotes, and comments or trailing commas are not accepted.
The TOML output appears when the input parses successfully. If the JSON is invalid, an error is shown and no result is produced. The result area also reports line and key counts.
Compare table names, array entries, special values, and numbers with the source before using the copy control. Clear the input to start over.
For instance, {"name":"Riley","active":true} becomes name = "Riley" and active = true. The counts describe the emitted text; they do not certify compatibility with your application.
Use cases
See how the tool fits into real work and everyday tasks.
When a service or documentation sample gives you a JSON settings object but your project expects TOML, convert the object, then compare each output table and key with the project's configuration guide. This is helpful for reviewing a small settings snippet before adding it to a configuration file.
For a list of named entries, such as several user or service records, inspect each generated array-table block in order. Confirm that the values remain attached to the intended record, especially when entries contain nested objects.
Q&A
Find concise answers to common questions and confusing cases.
TOML has no null value. This converter writes each JSON null as an empty string, "". That changes the value's meaning; replace or otherwise handle it yourself if an empty string is not valid for the destination.
The converter wraps any root value that is not an object in a TOML assignment named value. Rename or restructure that assignment if your application expects a different setting name.
No. The input is parsed as JSON, so remove comments and trailing commas and check that quotes, braces, and brackets are paired.
Notes
Review scope, result limitations, and important precautions before use.
Because JSON numbers are parsed as JavaScript numbers before output is written, integers outside the safe range of −9,007,199,254,740,991 through 9,007,199,254,740,991 may not retain their exact digits. If a value is an identifier, exact amount, or other number that must not change, keep it as a quoted string in the input when appropriate and verify the result. Review decimal values as well.
Also inspect every null replacement: an empty string is not equivalent to a missing value or a null value. The output is a starting point for review and does not validate application-specific settings.
Related
Discover related tools, collections, and available API capabilities.