🍋
Menu
🍋 Developer Tools

.env Validator

Validate, sort, and compare .env environment files

Free Browser-only No sign-up
chars words sentences lines

.env Options

Results

Result

About .env Validator

Validate .env files for syntax errors, sort variables alphabetically, or compare two .env files to find differences. Essential for managing environment configuration across deployments.

How It Works

Paste your .env file content and choose an action. Validate checks for syntax issues (empty values, duplicates, invalid names). Sort reorders variables alphabetically. Compare finds differences between two .env files.

Step by Step

  1. 1 Paste your .env file content
  2. 2 Choose action: Validate, Sort, or Compare
  3. 3 For Compare mode, paste the second .env in the input below
  4. 4 Review the results and copy cleaned output

Tips

  • Run validation before deploying to catch missing values
  • Sort .env files for easier reading and version control
  • Compare .env and .env.example to find missing variables
  • Variable names should use UPPER_SNAKE_CASE

Frequently Asked Questions

What syntax rules are checked?
Empty values, duplicate keys, invalid variable names (must start with letter/underscore, contain only alphanumerics/underscores), and malformed lines.
Are comments preserved?
Yes. Lines starting with # are treated as comments and preserved in their position during sorting.