.env formatter
Nothing typed here leaves your browser — but a .env holds secrets, so paste with that in mind.
Processed in your browser · nothing is uploaded
Normalises a `.env` file: `KEY=value` with no spaces around the equals, keys uppercased with underscores, an `export` prefix removed, and quotes added only where the value needs them.
How to use the .env formatter
The spaces are the bug this exists for. `KEY = value` looks correct and is not: most `.env` loaders read everything after the first `=` literally, so the value becomes `" value"` with a leading space. That produces failures that make no sense — a URL that will not connect, a token rejected as invalid — because the whitespace is invisible everywhere you would look for it. Quoting follows the same logic. A value containing a space, a `#`, a quote or a `$` needs quotes or it will be truncated at the space, read as a comment, or interpolated. A value that needs none is left bare, because unnecessary quotes are themselves a source of confusion — some loaders strip them and some do not, and a value of `"abc"` including the quotes is a very annoying bug. A `.env` is not a shell script even though it looks like one. `export` is accepted by some loaders and ignored by others, multi-line values are supported inconsistently, and command substitution is not supported at all by most. Keep values simple and single-line.
Questions
Most loaders take everything after the first = literally, so the value gains a leading space. That is invisible and breaks connections.