DEVELOPER TOOLS

.env File Validator & Redactor

Check a single-line dotenv file for common syntax problems and create a safer copy. Values are fully redacted by default.

LOCAL ENVIRONMENT-FILE CHECK

Validate and redact .env text

Browser-only · values redacted

Supports blank lines, comments, export KEY=value, and single-line single- or double-quoted values. In unquoted values, a comment starts at whitespace followed by #. Multiline values and shell expansion are not evaluated. Input limit: 500,000 characters.

Review warning: This opt-in can expose values the key-name check does not recognize as sensitive. Review every preserved value before sharing. Names matching common key, secret, password, token, credential, auth, cookie, passphrase, URL/URI/DSN, session, JWT, certificate, and SSH patterns remain redacted.

Syntax checks passed.

The output omits comments and blank lines. Invalid input produces no partial output.

Parsing and redaction happen locally in this browser. The input and generated output are not uploaded. Diagnostics show line numbers and generic messages, never variable values.

.env file validator and redactor guide

A dotenv file looks simple, but misspelled keys, repeated assignments, unmatched quotes, and accidental whitespace can cause confusing configuration behavior. This validator checks a documented single-line subset of common .env syntax and creates a sanitized copy without sending the text to a server.

The safest default is to redact every value. You can explicitly choose to keep values for keys that do not look sensitive, but name-based checks are imperfect: review the output yourself before sharing it, and never treat an automated redactor as a secret scanner.

Read syntax diagnostics without exposing values

The parser recognizes blank lines, comments, optional export, valid key names, assignments, and supported single- or double-quoted values. It can flag malformed assignments, duplicate keys, and unterminated quotes while keeping the actual values out of the diagnostic messages.

Dotenv implementations vary. This page does not execute shell expansion, interpolate variables, evaluate command substitutions, or support every multiline convention used by every library. If your application relies on a specific dotenv package, compare the file with that package’s parser and documentation.

Redact before sharing a configuration template

By default, the exported template replaces every assignment value with a redaction marker while preserving the key names. That produces a useful skeleton without copying credentials into a chat, issue, or code review. Comments and blank lines can help preserve context, so still read the output before sending it.

An optional mode can keep values for keys that do not match common secret-like names and redact likely credentials. That is a convenience, not a guarantee: secrets can be stored under ordinary names such as URL or VALUE. Prefer all-value redaction when you are unsure, and manually inspect the result.

Protect the original secrets

Parsing and redaction happen locally in your browser. No file is uploaded, and values are not included in error messages. Even so, the pasted contents remain visible in the current browser tab and device memory; avoid using a shared or monitored computer for production credentials.

Redacting a copy does not rotate credentials that may already have been exposed. If a real secret was committed or shared, revoke or rotate it through the service that issued it, remove it from active configuration, and check the repository history according to your organization’s incident process.

Frequently asked questions

Are all values redacted by default?

Yes. The default output replaces every value. The less restrictive mode is opt-in and should be reviewed before sharing.

Can the redactor guarantee that no secret remains?

No. Secret detection by key name is only a heuristic, and a sensitive value can use an ordinary-looking key. All-value redaction is safer, but review the result.

Does it support every dotenv format?

No. It checks a documented single-line subset. Multiline values, shell expansion, and library-specific conventions may need validation with your application’s parser.

Is the .env text uploaded?

No. Parsing and redaction run locally in your browser; values are not sent to NAB Tools.

Privacy note: this tool processes your data in your browser. Your inputs and files are not submitted to NAB Tools.