Convert .env to JSON or YAML
Paste a .env file and get it as JSON or YAML — quotes and export statements handled. It converts in your browser (0 uploads, works offline).
How to use it
- Paste your input into the left pane.
- Choose any options above the panes.
- The result updates live on the right — Copy or Download it.
FAQ
How do I convert a .env file to JSON for free?
Paste your .env contents and choose JSON or YAML — the converted config appears instantly in your browser with no upload. Surrounding quotes and leading export are stripped, and comment lines are ignored.
Does it keep my values as strings?
Yes — environment values are always strings, so a port like 3000 stays "3000", which is correct: .env has no types. Convert types in your application if needed.
Is my config uploaded?
No. The conversion is local and nothing is stored; it works offline — which matters because .env files often hold secrets.
Are comments preserved?
Comment lines (starting with #) are skipped, since JSON has no comments and the output is the key/value data only.
Limits
Parses KEY=VALUE lines; multi-line values and variable interpolation are not supported.
Related
The JSON-to-YAML converter handles those formats; the YAML formatter tidies YAML.
Bookmark this page (Ctrl+D, or ⌘D on Mac) or install the app — it works offline the next time you need it.