dotenv

Parse a .env file, spot the quoting and duplicate-key mistakes, and convert it to other formats.

Runs in your browser — nothing you type here is sent anywhere.
.env
15
keys
10
warnings
4
secrets
warnings
  • L3DATABASE_URL has whitespace around "=". Loaders trim it, but a shell that sources this file will not.
  • L5api_secret has whitespace around "=". Loaders trim it, but a shell that sources this file will not.
  • L5api_secret has trailing whitespace. It was trimmed here, but some loaders keep it — quote the value if you meant it.
  • L5api_secret is lowercase. Environment names are conventionally UPPER_SNAKE_CASE.
  • L10QUOTED_TWICE still starts and ends with a quote, so the quotes are part of the value. It was probably quoted twice.
  • L11PUBLIC_URL refers to another variable. dotenv doesn't expand those unless you add dotenv-expand, so the value stays literal.
  • L12my.bad-key is lowercase. Environment names are conventionally UPPER_SNAKE_CASE.
  • L12my.bad-key isn't a valid shell identifier, so export and most tooling will reject it. Use letters, digits and underscores, starting with a letter or underscore.
  • L14DATABASE_URL is set 2 times (lines 3, 14). The last one wins — delete the rest.
  • L18UNCLOSED opens with a double quote that is never closed, so the rest of the line was read as plain text.
output
{
  "NODE_ENV": "development",
  "DATABASE_URL": "postgres://app:hunter2@db:5432/app",
  "API_KEY": "********",
  "api_secret": "********",
  "GREETING": "hello\nworld",
  "LITERAL": "hello\\nworld",
  "BIN_PATH": "/usr/local/bin#notacomment",
  "CACHE_TTL": "300",
  "QUOTED_TWICE": "'wrapped twice'",
  "PUBLIC_URL": "${BASE_URL}/app",
  "my.bad-key": "********",
  "EMPTY": "",
  "JWT_PRIVATE_KEY": "********",
  "UNCLOSED": "\"oops",
  "LOG_LEVEL": "info"
}
variables
NODE_ENVdevelopment
DATABASE_URLpostgres://app:hunter2@localhost:5432/app
API_KEY********
api_secret********
GREETING2 lines
LITERALhello\nworld
BIN_PATH/usr/local/bin#notacomment
CACHE_TTL300
QUOTED_TWICE'wrapped twice'
PUBLIC_URL${BASE_URL}/app
my.bad-key********
EMPTYempty
DATABASE_URLpostgres://app:hunter2@db:5432/app
JWT_PRIVATE_KEY********
UNCLOSED"oops
LOG_LEVELinfo

Quoting follows dotenv: double quotes expand \n, \r, \t, \\ and \" while single quotes and backticks stay literal, and a quoted value can run over several lines. An unquoted # only starts a comment when whitespace comes first, so BIN=/usr/bin#x keeps the hash. Duplicate keys are reported and the last one wins, matching every loader. Mask secrets redacts anything whose name contains KEY, TOKEN, SECRET, PASSWORD, PRIVATE or CREDENTIAL — deliberately eager, so a masked view is safe to paste into a ticket. The compare always runs on the real values, so a changed secret still shows up as changed. Docker's --env-file can't carry a line break, so any value holding one is escaped and flagged in the output rather than quietly broken.

`.env` files have quiet failure modes. A duplicate key silently wins, an unquoted value with a space gets truncated, and an inline comment sometimes ends up inside the value. None of these announce themselves — the variable is just wrong at runtime.

Paste the file and each variable is listed as parsed, with warnings for duplicates, suspicious quoting and probable secrets. It converts to JSON, YAML, shell exports or Docker's env-file format.

What people open it for

In the terminal

tools dotenv

Every utility is also a command in the desktop's shell.

More data tools

Open the full desktop, with all 47 utilities