Sort, align, and validate .env variables in KEY=VALUE format, detect duplicates, and generate .env.example files.
ENV Formatter is a free online tool that sorts, normalizes, and validates environment variables in KEY=VALUE format. It detects duplicate keys, empty values, and potentially sensitive secrets, preserves comments and section blocks, and can generate a .env.example file. The tool runs in your browser and does not send data to the server.
Choose a related tool for the next step.
Data passed between tools is kept only in the current browser session.
ENV Formatter brings environment variables to a consistent form: sorting keys, removing extra spaces around =, preserving comments and blank lines between sections, and finding duplicates, empty values, and invalid lines. The tool is useful for Node.js, Next.js, NestJS, Docker, backend services, CI/CD pipelines, and local development.
You can also generate a .env.example by keeping all keys but clearing their values, so no real secrets are exposed. .env files often contain secrets, so a result with real tokens and passwords must never be committed to git.
All processing is done locally in the browser. Your data is not sent to the server.