All Tools View Categories About Contact Privacy

Env Variable Prefix Grouper

Section a .env file by prefix (NEXT_PUBLIC_, VITE_, DB_, ...) with readable headers.

Runs entirely in your browser — nothing is uploaded.

About Env Variable Prefix Grouper

Long .env files hide relationships. The Env Variable Prefix Grouper sections a file by prefix — NEXT_PUBLIC_, VITE_, REACT_APP_, DB_, and any other PREFIX_ — so every group of variables sits under its own header.

Groups and keys sort alphabetically by default (each togglable), comments travel with their keys, and unprefixed variables collect under a GENERAL section. The result is a configuration file you can navigate like a table of contents.

Features

  • Prefix sections: header per first-underscore group.
  • GENERAL section: unprefixed keys stay visible.
  • Sort groups: alphabetical A-Z, togglable.
  • Sort within groups: keys ordered, togglable.
  • Headers on/off: optional section markers.
  • Comments travel: docs stay with keys.
  • Copy or download: ready to save.
  • Private: fully client-side.

How to Use

  1. Paste your .env or load the sample.
  2. Choose sorting and header options.
  3. Click Group. The sectioned file appears.
  4. Copy it into your project.

Examples

Example 1 — Front-end repos. NEXT_PUBLIC_, VITE_, and REACT_APP_ variables are separated so client-bundled config is easy to review.

Example 2 — Monolith config. A large file is sectioned by DB_, REDIS_, AWS_, and SMTP_ groups.

Example 3 — Onboarding map. New engineers read the section headers as a table of contents.

Example 4 — CI pipelines. Staging pipelines consume grouped files where each section maps to a deployment step.

Benefits

  • Navigable: sections at a glance.
  • Complete: GENERAL catches everything.
  • Deterministic: stable ordering.
  • Comment-safe: docs preserved.
  • Private: nothing uploaded.

Frequently Asked Questions

What does this tool do?
Groups .env keys into sections by their prefix — the text before the first underscore — and emits each section under a header like # ---- DB ----.
Where do unprefixed keys go?
Keys without an underscore form their own section named GENERAL, so nothing is dropped or hidden.
Are comments preserved?
Yes. Comment lines that sit above a key travel with it into its section.
Is anything uploaded?
No. Grouping is a client-side operation on the pasted file.