⚡
usefultools.dev
T→J

TOML to JSON Converter

NEW

Convert TOML to JSON in your browser with 2/4-space, tab or minified output and clear error locations.

Runs 100% in your browser — your input is never uploaded or stored on our servers.

Options

JSON has no date type, so TOML dates and times become ISO 8601 strings. Integers beyond 2^53 and inf / nan are written as strings so they are not silently changed. TOML comments are dropped.

⚡

Quick Examples

Typical inputs and the results this tool produces.

Key
title = "Demo"
{"title":"Demo"}
Table
[owner] name = "Ada"
{"owner":{"name":"Ada"}}
Date
born = 1979-05-27
{"born":"1979-05-27"}
Array
ports = [ 8001, 8002 ]
{"ports":[8001,8002]}
📖

Overview

TOML to JSON Converter parses a TOML document and prints it as JSON, ready for APIs, scripts or JSON-only tools. Tables become objects, arrays of tables become arrays of objects, and you can choose 2 spaces, 4 spaces, a tab or minified output.

JSON has no date type, so TOML dates and times are written as ISO 8601 strings. Integers beyond 2^53 and the TOML values inf and nan are also written as strings, so nothing is silently rounded or turned into null. Syntax errors in the TOML are reported with the line, the column and the line itself.

The conversion runs in your browser; your file is not uploaded.

Why use this tool?

  • Feeds TOML settings to JSON-only tools, APIs and scripts
  • Keeps large integers and special floats intact instead of rounding them
  • TOML errors show line and column, not just a message
  • Local processing — configuration data stays in your browser
⭐

Features

📄

Paste or upload

Paste TOML or open a .toml file up to 2 MB.

🔢

Four output styles

2 spaces, 4 spaces, tab or a single minified line.

🗓️

ISO dates

Dates, times and date-times become ISO 8601 strings.

🔟

Large numbers safe

Integers beyond 2^53, inf and nan are written as strings with a notice.

⇄

Swap direction

Send the JSON to the JSON → TOML tool to check the round trip.

⬇️

Copy or download

Copy the JSON or save a .json file.

🛠️

How to Use

1

Add your TOML

Paste it, open a file, or press Load sample.

2

Choose the indent

Select 2 spaces, 4 spaces, tab or Minified.

3

Check notices

Red errors give the line and column; amber notes explain values written as strings.

4

Copy or download

Use Copy, Download .json, or Swap to convert back.

🤔

Frequently Asked Questions