Esta página ainda não foi traduzida para o português, por isso aparece em inglês.

.env File Validator — Check Syntax, Duplicates & Missing Keys

Paste a .env file to find invalid keys, duplicates, empty values and quoting mistakes, compare it with .env.example to spot missing variables, and generate a safe example file. Runs entirely in your browser — nothing is uploaded.

Atualizado em
🔒 Runs locally. Your .env is parsed in this browser tab and never sent anywhere. Values are masked in the report.
    LineKeyValueNotes
    .env.example (values removed)

    Seus dados nunca saem do seu computador. Todo o processamento acontece localmente no navegador.

    Como usar: .env File Validator

    1. Paste your .env into the left box. Optionally paste .env.example (or a list of required keys) on the right.
    2. Read the issue list: errors break parsing, warnings are likely mistakes or risky values.
    3. Check the table for every variable — values are masked so you can share a screenshot safely.
    4. Download the generated .env.example and commit it instead of your real .env.

    .env syntax in a nutshell

    LineResult
    PORT=3000Simple 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=abcexport prefix is allowed and ignored by dotenv
    # commentComment; 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 = value breaks 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.

    Perguntas frequentes

    Is it safe to paste my .env here?
    The validator runs only in your browser; nothing is uploaded or stored. Values are masked in the report. Still, avoid pasting production secrets into any website if your policy forbids it — use the example file instead.
    Do I need quotes in a .env file?
    Only when the value contains spaces, #, quotes or line breaks, or starts with a special character. Double quotes allow escapes like \n; single quotes keep the value literally.
    What is .env.example for?
    It documents which variables the project needs, without real values. Commit it so new teammates and CI know what to configure; keep the real .env out of Git.
    Why does my variable stay undefined?
    Typical causes: a typo or different case in the key, a duplicate later in the file, spaces around =, an unclosed quote above it, or the file isn’t loaded (wrong folder or missing dotenv config). Front-end bundlers also require prefixes like VITE_ or NEXT_PUBLIC_.
    Posso instalar o .env File Validator como um aplicativo da web e usá-lo offline?
    Sim. O .env File Validator é um aplicativo da web instalável (PWA) — instalado a partir do seu navegador, não baixado de uma loja de aplicativos. Clique em “Instalar aplicativo” na parte superior desta página no Chrome ou no Edge (Windows, macOS, Linux, ChromeOS) ou, no Android, use “Compartilhar” → “Adicionar à tela inicial” no iPhone e no iPad, ou “Arquivo” → “Adicionar ao Dock” no Safari 17+ em um Mac. Em seguida, ela se abre em uma janela própria com seu próprio ícone e, como é executada inteiramente no seu navegador, continua funcionando offline. O Firefox no desktop não permite a instalação de aplicativos da web. Como funciona a instalação.

    Ferramentas relacionadas