Validation rules
The validator accepts blank lines, full-line comments, optional export prefixes, and KEY=value assignments with letters, numbers, and underscores in keys.
Paste a .env file to clean formatting, validate variable syntax, detect duplicates, and review common configuration warnings.
Paste .env content or load a sample to begin.
Paste KEY=value lines. The parser keeps values as text and never expands variables, resolves paths, or executes shell syntax.
Formatted output appears after validation.
.env validation
Validate .env content to see variable counts, duplicate keys, comments, blank lines, and grouped findings.
.env Guide
Use this page for local .env syntax cleanup and review before copying settings into an app, Docker Compose file, or CI variable list.
The validator accepts blank lines, full-line comments, optional export prefixes, and KEY=value assignments with letters, numbers, and underscores in keys.
Duplicate variable names are flagged because many loaders keep the last value, while teammates may read the first one during review.
Quoted values can contain spaces and hashes. Unquoted inline comments are detected when a hash follows whitespace.
Names such as API_KEY, SECRET, TOKEN, PASSWORD, PRIVATE_KEY, CONNECTION_STRING, and DATABASE_URL trigger warnings so real credentials get extra review.
.env files are line-oriented key-value text, not nested configuration. Use YAML or JSON tools when the config needs objects, arrays, or structured schemas.
Formatting can normalize equals spacing, preserve comments and blank lines, or sort keys alphabetically. It never expands variables or evaluates shell expressions.
No. The page only processes text you paste into the editor or load from a sample.
No. Variables, paths, and shell expressions stay as plain text and are never resolved or executed.
Yes by default. Turn off comment and blank-line preservation when you want only variable assignments in the formatted output.
Yes. Sorting is off by default so comments and file order stay intact unless you choose alphabetical output.
Yes. Use the download action to save the formatted output as .env.