
TOML <-> JSON converts a TOML file to JSON or a JSON object back to TOML with the smol-toml library. Invalid TOML or invalid JSON is refused with the parser's own error message. TOML has no null value and no top-level array, so a JSON value using either is refused when writing TOML, with that exact reason given.
Questions
What library does the conversion?
smol-toml, imported lazily inside the run.
What happens converting a JSON null or top-level array to TOML?
It is refused, since TOML has neither concept, with that exact reason given.
What if my TOML is invalid?
The tool refuses with smol-toml's own parser error message.
What if my JSON is invalid?
The tool refuses with JSON.parse's own error message.
Does it preserve key order?
Both directions preserve the order the underlying parser and stringifier produce, following each format's own rules rather than re-sorting.
Related Dev tools
n→nCBOR to JSON converterEncode JSON to CBOR bytes (shown as hex) or decode CBOR bytes back to JSON. Covers uint/negint/text/array/map/float/bool/null; no byte strings, tags, or indefinite-length items.Runs on each file you dropn→nJSON ↔ MessagePackEncode JSON to MessagePack bytes (shown as hex) or decode MessagePack bytes back to JSON. Covers nil/bool/int/float64/str/array/map: no bin, ext, or timestamp extension types.Runs on each file you dropn→nJSON ↔ RisonConvert JSON to Rison (the compact URI-safe notation Kibana/Elasticsearch use for query params) and back. This tool's own encoder/decoder for the documented core grammar (no reference implementation in this codebase to check against). Exotic edge cases like embedded control characters or surrogate-pair characters are not guaranteed byte-identical to the reference grammar.Runs on each file you dropn→nPHP serialize / unserializeConvert JSON to PHP's serialize() format and back. Covers null/bool/int/float/string/array. PHP objects (O:) are not implemented since they need a class registry this tool doesn't have.Runs on each file you dropn→nPLIST viewerView an XML property list (.plist) as JSON. Binary plist (bplist00) is not supported. It needs a separate binary-format parser this tool does not implement.Runs on each file you dropn→nGeoJSON ↔ CSVConvert GeoJSON Point features to CSV rows and back. LineString/Polygon geometries export as a flattened coordinate list (one-way; CSV->GeoJSON always builds Points). CSV parsing is fully quote-aware, so a quoted field holding a comma or a newline no longer shifts the coordinate columns.Runs on each file you dropn→nKML/GPX to GeoJSONConvert a GPX (waypoints/tracks/routes) or KML (Placemarks: Point/LineString/Polygon) file to GeoJSON. A hand-rolled tag scan, not a general XML parser: no styles, nested Folder hierarchy, MultiGeometry, or extended data.Runs on each file you drop·→1Coordinate format convert (DD/DMS/UTM)Convert between decimal degrees, degrees-minutes-seconds, and UTM. WGS84, standard 6° zones, non-polar only. MGRS grid-square lettering is not implemented (its edge cases are a separate, riskier piece of work).Takes no file