Search for a command to run...
Convert .env files to JSON and back, with quoting, comments and type parsing handled for you.
Parse numbers and booleans
Applies to unquoted values only. Quoted values always stay strings.
Sort keys
Order output keys alphabetically instead of keeping file order.
Single-quoted values stay literal, while double-quoted values unescape \n, \r, \t and backslash sequences. Multi-line quoted values are not supported.
Keys in output: 10
No problems found in the current input.
What
A .env file stores configuration as KEY=VALUE lines that tools load into environment variables. This converter turns those lines into structured JSON and rebuilds a valid .env file from JSON, entirely in your browser.
Cases
Turn a .env file into JSON for a config schema or test fixture.
Rebuild a .env file from a JSON export before local development.
Diff two environments by converting both .env files to sorted JSON.
Spot malformed lines and duplicate keys before a deployment fails.
Prepare environment variables for Docker Compose or CI pipeline files.
Check how quoted values and inline comments are actually parsed.
How To
Pick a direction, paste your configuration, review the warnings and copy the result.
Select .env to JSON or JSON to .env at the top of the tool.
Paste the file contents or load the sample to see the expected format.
Enable type parsing for numbers and booleans, or sort keys alphabetically.
Check the line-by-line notes, then copy the generated output.
Knowledge
FAQ