Tool guide
About this tool.
- A dotenv file stores named string values as KEY=value lines. It is configuration text, not a JSON object or executable shell script.
- Formatting normalizes assignment spacing while preserving names, values, quotes, comments and source order. It does not sort, deduplicate or resolve references.
- Malformed syntax or duplicate names stop formatting instead of deleting invalid lines.
- Normalize a development configuration before reviewing its diff.
- Keep quoted spaces and literal variable references intact.
- Use Validator for diagnostics and Secret Redactor before preparing a shareable copy.
Paste configuration or select a sample.
Run formatting and review the output before replacing your source.
Use Copy or download formatted.env for the exact normalized text.
Formatting preserves secrets. Do not publish this output without a separate review.
- export PORT = 3000 → export PORT=3000.
- LABEL=" demo " → LABEL=" demo ", with its quoted spaces kept.
- URL = ${BASE_URL}/v1 → URL=${BASE_URL}/v1, a literal reference.
- EMPTY = with no value → EMPTY=, an empty string.
- PORT=3000# note → PORT=3000 # note.
- PORT=3000 then PORT=4000 → an error naming the duplicate; no last-value-wins rewrite.
- 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.
- Formatter is not a redactor: secrets remain in the output, clipboard and downloaded file.