Paste JSON, get clean TOML with proper tables and arrays of tables, all in your browser
- Runs locally
- Category Format Converter
- Best for Turning pasted content or local files into a handoff-friendly format.
What this tool does
Free online JSON to TOML converter for developers who live in Cargo.toml, pyproject.toml, Hugo and Netlify config files. Paste any valid JSON and this tool serializes it to readable TOML: scalar values become key = value pairs, nested objects turn into [table] headers with dotted paths like [a.b.c], arrays of objects become [[array.of.tables]] blocks, and simple lists render as inline arrays such as [1, 2, 3]. Strings are double-quoted and escaped correctly, special key names get quoted, and ISO date strings are left bare so a TOML parser reads them as dates. Because TOML has no null, null-valued keys are dropped rather than written as broken syntax. Everything runs as plain JavaScript in your browser tab with one-click copy and a shareable link that reproduces your exact input. No upload, no account, no server round trip.
Tool details
- Input
- Text + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Download
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 10 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Format Converter · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How JSON to TOML Converter fits into your work
Use it when the main problem is getting content from one practical format into another.
Conversion jobs
- Turning pasted content or local files into a handoff-friendly format.
- Previewing a conversion before you use it in a larger workflow.
- Cleaning small format mismatches without opening a full editor.
Conversion checks
- Try a small sample first when the source format is messy.
- Check character encoding, separators, and line endings after conversion.
- Keep the source until the converted output has been reviewed.
Good next steps
These links move the current task into a more complete workflow.
- 1 JSON Formatter & Validator Format, validate, and minify JSON instantly — right in your browser. Open
- 2 YAML ⇄ JSON Converter Convert between YAML and JSON — both directions, pretty-printed, error messages with line numbers — browser-only Open
- 3 JSON to YAML Converter Convert JSON to clean YAML — block scalars for multiline strings, optional key sorting, 2/4-space indent, line-numbered errors — browser-only Open
Real-world use cases
Seed a Cargo.toml or pyproject.toml from JSON
You have project metadata sitting in a JSON file or an API response, and you need it as a Cargo.toml or pyproject.toml. Paste the JSON, copy the TOML, and drop it into your config. Nested objects land as [package] and [dependencies] tables, version pins come out as key = value, and you skip the error-prone retyping that usually introduces a stray comma or a missing quote.
Convert a config exported from a UI or admin panel
Many dashboards let you export settings as JSON but the runtime reads TOML. Rather than maintaining two formats by hand, run the JSON export through this tool whenever settings change. Arrays of service objects become [[services]] blocks and flat option lists stay inline, so the generated file looks like one a human wrote, not a machine dump.
Build TOML fixtures for tests
Writing tests for a tool that parses TOML? Author the expected data as JSON, where you already have editor support and validation, then convert it to a TOML fixture. You get a deterministic mapping for tables, arrays of tables and inline arrays, which keeps your fixtures consistent instead of hand-formatted differently each time.
Learn TOML syntax by example
If you know JSON but TOML headers and double-bracket arrays still look cryptic, paste a JSON shape you understand and read the TOML it produces side by side. Seeing {"a": {"b": 1}} become [a] then b = 1 makes the table model click faster than reading the spec, and the shareable link lets you save examples to revisit.
Common pitfalls
Expecting null to survive. TOML has no null, so a null-valued key is dropped, not written as key = null. If you need the key kept, swap null for an empty string or a placeholder before converting.
Feeding a JS object literal instead of strict JSON. Single quotes, trailing commas and unquoted keys are not valid JSON and the parser rejects them. Run the source through a JSON formatter first if you are unsure.
Assuming a top-level array maps one to one. TOML documents need a table at the root, so a bare JSON array is wrapped under an items key. Restructure your JSON as an object if you want a specific top-level table name.
Privacy
The whole conversion is plain JavaScript running in your browser tab. Your JSON, the parsed data and the TOML output never leave the page and nothing is logged. The one caveat: the shareable link encodes your input in the URL query string, so a link pasted into chat will record that input in the recipient server's access log. For secrets or private config, use the copy button and paste the text instead of sharing the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Age Difference Calculator The exact gap between two birthdays — years/months/days, percentage, and the date one person is twice the other's age — browser-only