A lightweight Visual Studio Code extension designed to generate secure, cryptographically random JWT secrets directly into your .env file—either with customizable options or instantly via a keyboard shortcut.
- Instant Quick Generation: Instantly generate and insert a recommended 256-bit Hex secret using a simple keyboard shortcut (
Ctrl+Alt+J/Cmd+Alt+J). - Multiple Security Standards: Choose between 256-bit (recommended), 384-bit, or 512-bit key sizes.
- Flexible Encoding Formats:
- Alphanumeric (Hexadecimal): Clean and universally supported hex strings.
- URL-Safe (Base64URL): Standard Base64URL encoding suitable for Web APIs.
- Extended Special Characters: Complex ASCII symbol mix generated with high entropy and unbiased character distribution.
- Automated
.envManagement:- Automatically creates a
.envfile if one does not exist in your root workspace. - Updates the existing
JWT_SECRETkey without overwriting other environment variables. - Automatically saves unsaved changes before writing to disk.
- Automatically creates a
- Quick Actions: Instantly open the updated
.envfile or copy the generated secret directly to your clipboard.
- Open your project workspace in VS Code.
- Press
Ctrl+Alt+J(Windows/Linux) orCmd+Alt+J(macOS). - The extension will automatically write or update
JWT_SECRETin your.envfile using a 256-bit Hex secret!
- Open a workspace folder in VS Code.
- Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS) to open the Command Palette. - Type and run:
JWTenv: Generate Jwt Secret in .env (Custom) - Select your preferred key size (256-bit, 384-bit, or 512-bit).
- Select your preferred encoding format (Hex, Base64URL, or Complex ASCII).
- Choose whether to open the
.envfile or copy the secret to your clipboard.
| Command | Keybinding (Win/Linux) | Keybinding (macOS) | Description |
|---|---|---|---|
| JWTenv: Quick | Ctrl + Alt + J |
Cmd + Alt + J |
Generates a 256-bit Hex secret directly into .env |
This extension works out-of-the-box and does not require additional configuration settings.
This project is licensed under the MIT License - see the LICENSE file for details.