Como usar: .env File Validator
- Paste your
.envinto the left box. Optionally paste.env.example(or a list of required keys) on the right. - Read the issue list: errors break parsing, warnings are likely mistakes or risky values.
- Check the table for every variable — values are masked so you can share a screenshot safely.
- Download the generated
.env.exampleand commit it instead of your real.env.
.env syntax in a nutshell
| Line | Result |
|---|---|
PORT=3000 | Simple value |
APP_NAME="My App" | Quotes needed for spaces |
GREETING='Hello $USER' | Single quotes: no variable expansion (dotenv-expand, Docker Compose) |
KEY="line1\nline2" | Double quotes: \n becomes a line break |
export TOKEN=abc | export prefix is allowed and ignored by dotenv |
# comment | Comment; after a value only when preceded by a space and the value is unquoted |
Common mistakes this validator catches
- Duplicate keys — most loaders keep the first or the last value silently, so changes seem to have no effect.
- Spaces around = or in unquoted values —
KEY = valuebreaks in shells and Docker. - Unclosed quotes that swallow the following lines.
- Invalid names — keys should be letters, digits and underscores and not start with a digit.
- Secrets such as AWS keys, Stripe live keys, GitHub tokens or private keys — fine in a local .env, but never commit them.
Keep .env out of Git
Add .env to your .gitignore and commit a .env.example with the keys only. In CI, store values as secrets — see the GitHub Actions Workflow Generator. Front-end frameworks expose variables with prefixes like VITE_, NEXT_PUBLIC_ or PUBLIC_ to the browser — never put secrets in those.
Também pesquisado como: .env checker, dotenv validator, env example generator, env variables check, missing environment variables, dotenv syntax, env file format.
Ferramentas que combinam com: .env File Validator
- Gerador do Docker Compose — Marque os serviços que você precisa — aplicativo, banco de dados, cache, interface de administração, captador de e-mails — e receba um arquivo `compose.yaml` limpo com imagens fixadas, volumes nomeados, verificações de integridade e depends_on condições, além de um arquivo .env correspondente com senhas geradas.
- package.json Generator — Fill in a form and get a valid package.json — npm name validation, script presets for Vite, Next.js, Node and TypeScript libraries, exports, engines, license and repository — with warnings for common mistakes.
- Unicode Character Inspector — Paste anything to see what it’s really made of: each character’s name, code point, UTF-8 bytes and HTML code.
- Verificador de Diferenças — Cole uma versão original e uma versão alterada para ver lado a lado as linhas adicionadas, removidas e modificadas — com as palavras exatas que mudaram destacadas dentro de cada linha.