Illustration of a TOML block converting to and from an equivalent JSON block

JSON ↔ TOML Converter

Paste JSON or TOML below and convert either direction. Parsing/writing TOML isn't practical in a browser without an external library, so this one round-trips to the server to convert — nothing is stored, the request/response is the only place it exists.


ℹ️ About this converter
  • Uses Python's standard-library tomllib (parsing) and tomli_w (writing) on the server — the only way to get correct, spec-compliant TOML without an external JS library.
  • TOML documents are always a table at the top level, so converting JSON → TOML requires a JSON object (not an array or a bare value); TOML has no null, so a JSON null anywhere in the input can't be converted.
  • Nothing is logged or stored: the pasted content only exists for the duration of the request.
💻 Show API usage example (cURL)
curl -sS "https://devops.majbase.com/json-toml-converter/api" \
    --data-urlencode 'direction=json-to-toml' \
    --data-urlencode 'text={"name": "my-app", "port": 8080}'

Returns {"result": "..."}, or {"error": "..."} for malformed input. Use direction=toml-to-json for the other way; optional sort_keys=true and indent=2|4 (toml-to-json only).

🤖 Use this API as a Claude Skill

Want an AI agent (Claude Code, claude.ai, or anything else that supports the Agent Skills format) to use this tool for you on request? Download the skill below and add it:

⬇️ Download SKILL.md · View raw