.env diff

← All tools

Paste .env.example and your local .env. The page lists missing keys, extra keys, empty values, and values that differ.

Both files stay in the browser. Nothing is uploaded, and secrets are not put in the URL.

~~~
Open file…
Open file…

Problems in .env.example

Problems in .env

Keys

KeyStatus.env.example.env

Every example key is set, and the local file has no extra keys.

~~~

About this tool

A .env.example file lists the keys an app reads. Your local .env fills them in. This page compares the two and keeps the values on your machine. Matching keys are hidden until you untick that box. The table shows the first 400 rows. Each file can be up to 2 MB.

The statuses are the ones this page assigns:

  • Missing means the key is in the example and not in the local file.
  • Extra means the key is only in the local file.
  • Empty means the local value is an empty string, even when the example is also empty.
  • Different means both sides have a value and they are not the same string.
  • Match means both sides have the same non-empty value.

Blank lines and full-line # comments are ignored. An optional export prefix is stripped. Spaces around= are ignored. An unquoted value ends at a space followed by #. Double quotes interpret \\,\", \n, \r, and \t, and a missing closer can run onto later lines. Single quotes are literal. When a key is repeated, the last value is compared and the earlier line is listed. $VAR and ${VAR}are not expanded.

A line without =, an empty key, text after a closing quote, an unclosed quote, and a key that is not letters, digits, and underscores are reported as problems. A name that fails that pattern is still compared. Example keys stay in example order. Extra keys follow, in the order they appear in the local file.

~~~

Read more

~~~

Free books, courses, and software

Get my programming books, course editions, and complete software.

Get the download library →