# ENV Checker

Check a .env file for mistakes before it breaks a deployment. The checker finds duplicate keys, lines without an equals sign, unclosed quotes, spaces around the equals sign, unquoted values with spaces, empty values and references to variables the file does not define. Each finding lists its line and key.

## Frequently asked questions

### What is reported as an error?

Lines the file cannot be read correctly from: a line without an equals sign, a key with invalid characters, a quote that is never closed and text after a closing quote that is not a comment.

### What is reported as a warning?

Lines that load but often cause trouble: a key defined twice, spaces around the equals sign, an unquoted value with spaces, a stray quote in an unquoted value, a key that is not a valid shell name and a reference to a variable the file does not define.

### What are notices?

Points worth a look that are often intended: empty values and keys with lowercase letters, since environment variables are usually written in uppercase.

### Why are spaces around the equals sign a problem?

dotenv tolerates them, but a shell that sources the file reads KEY = value as a command, and Docker's --env-file rejects a name followed by a space. Writing KEY=value works everywhere.

### How are variable references checked?

References such as $NAME or ${NAME} in unquoted and double quoted values are compared with the keys in the file. A reference to a key the file does not define is reported, because it is only filled in if the environment provides it.

### Is my file sent anywhere else?

No. The file is checked by this tool alone and is not stored. Still, consider replacing real secrets with placeholders before pasting a production file anywhere.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
