.env to JSON
Convert env assignments to a JSON object.
How to use .env to JSON
.env to JSON — Read KEY=value lines from a .env file and return a JSON object. Free to use in D2i DevTools — no account required.
Steps
- Fill in .env. This field is required.
- Click Run and copy the result under the form.
Frequently asked questions
What is .env to JSON used for?
Use it to turn a local env file into JSON before you compare it with a config sample.
How do I use the free online .env to JSON tool?
Fill in .env. This field is required. Click Run and copy the result under the form.
What can I paste or upload into .env to JSON?
Paste assignments, one per line. Blank lines and lines that start with # are skipped. export is optional.
What output does .env to JSON give me?
A JSON object. Quoted values are unquoted. Duplicate keys keep the last value.
Is .env to JSON free, and is my input private?
Yes — Your input is processed in memory for this request only. It is not saved to disk or the database, and it is cleared after the tool finishes.
Are values treated as numbers?
No. Every value stays a string, including 1 and true, so the file matches what a process would read.
Inputs are processed in memory only and are not saved to disk or the database. Data exists only for the duration of your request.