The converter parses TOML into JavaScript values and prints a paste-ready object literal. Tables become nested objects, arrays stay arrays, booleans and numbers remain typed values, and date-like TOML values are represented as Date objects.
The output does not include module syntax such as export default or CommonJS assignment. TOML comments and hand-written layout are dropped during parsing, and key sorting can reorder nested object properties.
Common questions and answers about this topic.
TOML uses key-value syntax with tables, comments, native date/time types, and multi-line strings. This tool emits a JavaScript object literal for parsed TOML data, using objects, arrays, strings, numbers, booleans, and Date constructors for TOML date/time values. It does not add JavaScript-only constructs such as functions or undefined.
Yes, with the sort keys dropdown you can alphabetically order all JavaScript object properties (A to Z) or keep the original order from your TOML tables. Sorting recurses into every nested object in the output.
Yes, the JavaScript output indentation is configurable to 2 spaces, 4 spaces, or tabs through the formatting options. For JS object literals, 2-space indentation aligns with most popular linter configurations.
No, the TOML to JS object conversion is handled entirely by JavaScript in your browser. Your TOML configuration data remains on your device and is never shared with any server.