TOML to JSON
Convert a TOML config to JSON, with tables and arrays of tables resolved.
Turn a .env file into JSON, with quotes, exports and comments handled.
This runs entirely in your browser and nothing is uploaded — but treat any secret you paste into any web tool as exposed, and rotate it.
The ENV to JSON converter reads a .env file properly: export prefixes, all three quoting styles, escape sequences and comments that must not be stripped from inside a quoted value — with optional nesting of underscored keys.
A .env file is a flat list of key-value pairs with just enough syntax to be annoying: optional export prefixes, three quoting styles, escape sequences inside double quotes, and comments that must not be stripped from inside a quoted value.
This converter handles all of that and gives you JSON. There is also an optional unflatten step that turns DB_HOST and DB_PORT into a nested db object, which is what you want when the destination is a config file rather than an environment. Because it runs entirely in your browser, pasting a file that contains real credentials does not send them anywhere — but the usual advice still applies: rotate anything you paste into a tool you did not write.
Export prefixes, double, single and unquoted values, and escape sequences inside double quotes are all handled the way a loader handles them.
Split keys on underscores so DB_HOST and DB_PORT become a db object — what you want when generating a config file.
Every environment variable really is a string, so no typing happens unless you ask for it.
A hash inside a quoted value is content, not a comment, which is where naive parsers truncate a password.
The conversion runs in your browser — though any secret pasted into any web tool is worth rotating regardless.
The whole file, comments and all.
Keep flat keys, or split on underscores to build a nested object.
Values are strings by default, as they are in a real environment. Turn on typing to get numbers and booleans.
Ready for a config file, a test fixture or a deployment template.
The conversion happens entirely in your browser and nothing is sent anywhere. Even so, treat any secret you paste into any web tool as exposed and rotate it.
Not by default, because every environment variable is a string in reality. Turn typing on when the JSON is headed somewhere that expects real types.
Double quotes allow escape sequences such as \n, single quotes are literal, and an unquoted value ends at the first whitespace-preceded comment.
It splits keys on underscores, so DB_HOST and DB_PORT become { "db": { "host": …, "port": … } } — useful when you are generating a config file rather than an environment.
What people who use the ENV to JSON think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the ENV to JSON. It takes half a minute and no account.
Write the first reviewConvert a TOML config to JSON, with tables and arrays of tables resolved.
Compare two semantic versions and test them against a range.
Test a regular expression live, with every match and capture group shown.
Convert a duration between seconds, ISO 8601, clock time and words.
Generate complete fake user profiles for seeding and design work.
Infer a draft-07 JSON Schema from a sample document in one step.
Generate cryptographically random version 4 UUIDs in bulk.
Turn a block of text into a comment in any language, wrapped and aligned.