Check a .env file line by line as dotenv reads it, and convert it to JSON or YAML
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.A .env file holds one KEY=value per line, read by the dotenv package and similar tools. A # starts a comment, even inside an unquoted value, so PASSWORD=abc#123 is read as abc. Quotes keep spaces and # signs, double quotes turn \n into a line break, and when a key appears twice the last value wins.
Paste the .env file into the left pane, or click Open a file.
Read the problems under it: each names its line, and Line N puts the cursor there.
Pick a format, JSON, YAML, Shell export, Docker env file or .env.example, to see the variables converted.
Click Copy, or Download to save the converted file.
A .env file looks simple, but small slips change what the program receives without any error: a # inside a password cuts it short, an unclosed quote becomes part of the value, and a second line with the same key quietly replaces the first. This tool reads the file exactly as the dotenv package does and shows every such line.
What is checked, with the line number of each:
| Problem | Example | What happens |
|---|---|---|
| Not an assignment | just some text |
ignored |
| # in an unquoted value | PASS=abc#123 |
read as abc |
| Unclosed quote | NAME="Asha |
value keeps the quote |
| Duplicate key | PORT twice |
the last one wins |
| Name a shell rejects | feature.flags=on |
source .env fails |
| Undefined reference | ${REDIS_HOST} |
left as written |
| Spaces without quotes | FROM=Example Team |
breaks in a shell |
Errors are lines dotenv ignores or misreads; warnings work in dotenv but not in a shell, Docker or Compose; notes such as an empty value are for information.
Conversions. The variables, as dotenv reads them, can be copied or downloaded in 5 forms: a JSON object; YAML, with every value kept as a string so 0123 and true are not reinterpreted; shell export lines with safe single quotes; a Docker env file, which cannot carry multi-line values; and a .env.example with every key and no values, ready to commit.
The reading is checked against dotenv itself on 401 test files, including multi-line keys, CRLF line endings and every quoting style. Nothing is expanded: ${OTHER} stays as written, as with plain dotenv.
The file stays in your browser's memory only. It is never uploaded, never stored, and is gone when you close the page, so real secrets are safe to paste.
In a .env file, a # starts a comment, even in the middle of an unquoted value, so PASSWORD=abc#123 is read as abc. Put the value in quotes, PASSWORD="abc#123" or PASSWORD='abc#123', and the whole text is kept. Every line with this problem is flagged here with its line number.
Yes. dotenv trims spaces at both ends but keeps the ones inside, so NAME=Example Team works. A shell running source .env would break on the space, though, and Docker keeps everything literally. Quoting values that contain spaces, NAME="Example Team", works the same in dotenv, Compose and shells.
Wrap the value in double quotes and either break the lines for real or write \n where each break goes. dotenv reads both, and turns \n into a line break only inside double quotes. Single quotes and backticks also span lines but keep \n as written. A Docker env file cannot hold multi-line values at all.
The last value wins, with no warning from dotenv, so a PORT set near the top can be silently replaced by another PORT further down. This tool lists every duplicate with the line of the first definition, so you can delete the one that should not be there.
Not by dotenv itself: API=${HOST}/api stays exactly as written. Docker Compose and the dotenv-expand package do replace ${HOST} with its value, and ${HOST:-fallback} supplies a default when HOST is unset. References to names the file never defines are flagged here, because they become empty in those tools.
Yes. The file is read by code running in your own browser; nothing is uploaded, logged or stored, and it is gone when you close or reload the page. Unlike the output format, which is remembered, the text you paste is never saved, not even in your browser's storage.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about .env File Validator and anybody who knows can answer. No account needed.
Same job, other tools: Link Preview Checker – Find the missing tag behind a WhatsApp or Slack link with no picture · Twitter Card Validator – Check twitter:card tags and the og: tags X falls back to.
On the related tools: Readability Checker – Flesch reading ease and grade level, with what to change.
Open it set for: .env.example Generator.