Code · Made a little simpler

ENV Compressor

Minify dotenv text by choosing how its loader treats unquoted hashes. Compare UTF-8 sizes, inspect the compact assignments and download the result.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Review the output before saving. The compressed file contains its original values.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

ENV Compressor: how to use it

  1. Paste or open your .env source. Load the release sample to try comments, an adjacent hash and a multiline value.
  2. Choose the rule your loader uses for an unquoted hash, then select Compress .env.
  3. Compare input and output bytes. Review the values and check the saved file with the loader that will use it.

Limits and notes

Use up to 262,144 UTF-16 code units per input and up to 10,000 lines of dotenv text. Processing takes place in your browser. Supports LF and CRLF source and produces UTF-8 with LF line endings. Malformed assignments and duplicates pause export. Byte counts reflect UTF-8 text. The downloaded file includes the original values.

How your privacy works →

ENV Compressor: common questions

How are hash signs inside quotes handled?

They stay in the value. The comment rule only changes how a hash in unquoted text is interpreted.

Why does the hash rule affect a tag like build#gray?

In Node.js mode the unquoted hash starts a comment. The whitespace option keeps a hash immediately after a non-whitespace character.

Does compression make an .env file safe to share?

The output still contains the assigned values. Use a separately prepared template when sharing configuration without secrets.

Guides