Skip to content

ENV validator

Checks KEY=value lines. The text in the editor is not rewritten.

Values stay strings. $NAME and ${NAME} are errors because this tool does not expand them.

Ctrl+Enter or ⌘+Enter runs this tool immediately.

ENV to check

Waiting for input.

Parsing stays in this browser. Input is not uploaded or saved.

How to use this tool

  1. Paste .env lines, or load the sample.
  2. Read the validation panel. A successful check counts keys and does not pretty-print the file.
  3. Copy the input from the editor if you want the original text.

Supported formats and limitations

  • Keys match [A-Za-z_][A-Za-z0-9_]*. A line without = is an error.
  • Duplicate keys are errors. The earlier assignment is not kept and the later one does not win.
  • $ interpolation is an error. The tool does not read other variables.
  • The check does not convert values to numbers or booleans, and it does not rewrite the file.
  • A # outside quotes starts a comment.

Examples

A valid assignment

export is optional. The key is the name before =.

export PORT=8080

A second PORT

The second assignment is an error. The line number is the later one.

PORT=8080
PORT=9090

Common errors and solutions

Duplicate key
Delete one of the assignments.
Variable interpolation
Replace the $ reference with the literal text you want stored.
Missing =
Write KEY=value. A key alone is not an empty value.

FAQ

Does a successful check rewrite the file?
No. The editor keeps the text you pasted, including comments and spacing.
Why is DEBUG=false not a boolean?
.env files do not carry types. The check only confirms the line can be read as text.
Is the file uploaded?
No. The check runs in your browser.

Read next

Related tools

  • ENV to JSON converter

    Convert a .env file to JSON in the browser. Every value stays a string, duplicate keys are errors, and $ references are not expanded.

  • JSON formatter

    Validate JSON, then pretty-print it with 2 or 4 spaces or minify it. Invalid JSON produces an error and leaves the output empty.

  • YAML validator

    Check YAML syntax without converting or rewriting it. Errors include a line and column when the parser provides them, and valid input is left unchanged.