Tool guide
About this tool.
- Validation checks whether assignments fit this parser and whether names are repeated. It reports all detected line issues rather than stopping at the first.
- Values remain strings. A syntactically valid PORT=hello is not proof that an application accepts that port.
- No values are resolved or executed. This is not a schema validator, connectivity test or secret scanner.
- Find malformed assignments, invalid names and missing closing quotes.
- Locate duplicate variables before deployment.
- Check the supported syntax before formatting or redacting.
Paste the complete file and run validation.
Read Valid/Invalid and each diagnostic line number.
Correct the source and run again; invalid lines are never rewritten for you.
Copy or download the diagnostic report. It may include variable names, but not assignment values.
- PORT=3000 → Valid .env with Variables: 1.
- EMPTY= → Valid .env; an empty value is allowed.
- BAD-NAME=x → Line 1: Invalid variable name "BAD-NAME".
- PORT=3000 then PORT=4000 → Line 2: Duplicate variable "PORT" (first declared on line 1).
- TOKEN="unfinished → Line 1: Unterminated quoted value.
- URL=${BASE_URL} → Valid .env, even when BASE_URL is not defined.
- The report lists the first 20 issues and counts the rest.
- This parser supports single-line KEY=value assignments, quotes, comments and optional export. Multiline values and shell execution are unsupported.
- Names must begin with an ASCII letter or underscore and contain only ASCII letters, digits and underscores. Names are case-sensitive.
- Unquoted # starts a comment, even without a space. Quote literal hashes such as URL fragments.
- Variable references such as ${BASE_URL} remain literal; no environment lookup, interpolation or escape decoding occurs.
- CRLF and CR become LF; an initial BOM is removed. Order, grouping and terminal newline are retained unless comments are explicitly removed.
- Input is limited to 1,048,576 UTF-16 characters. Duplicate names are reported as issues, not silently overridden.
- Validity applies only to this supported syntax, not every dotenv loader or your application schema.
- Variables counts distinct names and Assignments counts assignment lines. In a valid report they are equal, because a repeated name makes the file invalid.
- Diagnostic text can contain an invalid variable-name fragment; review it before sharing.