.env to JSON Developer
Convert environment-variable files into JSON, and back again.
.env to JSON is a free online tool that convert environment-variable files into JSON, and back again. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.
- Price
- Free — no account, no quota, no watermark
- Category
- Developer
- Where it runs
- In your browser, on your device
- Files uploaded
- None
- Technology
- plain JavaScript
- Settings
- 2
- Works offline
- Yes, after the first visit
About .env to JSON
A `.env` file becomes a JSON object. The parsing follows the usual dotenv conventions: `#` starts a comment, an optional `export` prefix is stripped, and surrounding single or double quotes are removed. Every value in a `.env` file is a string as far as the shell is concerned, so numeric and boolean conversion is offered as an explicit option rather than applied silently.
How to use it
- Paste the text you want to run through .env to json.
- Set direction and detect numbers and booleans.
The 2 settings
| Setting | What it does | Default |
|---|---|---|
| Direction | Choose from 2: .env → JSON, JSON → .env. | .env → JSON |
| Detect numbers and booleans | On or off. On by default. | On |
Under the hood
| Runs on | plain JavaScript — runs the whole thing |
| Controls | Direction, Detect numbers and booleans |
Questions
Should I convert values to numbers?
Only if your consumer expects them typed. Environment variables are strings by definition, and code that reads `process.env.PORT` receives "3000", not 3000. Converting can hide a bug rather than fix one.
Is it safe to paste a .env file here?
Nothing is transmitted — the parsing happens in your browser and there is no upload endpoint on this site. That said, be careful about pasting production secrets into any browser tab, including this one.