A VS Code extension for quickly encoding and decoding Base64 and Hex strings directly in your editor.
- Text ↔ Base64: Encode plain text to Base64 or decode Base64 back to text
- Hex ↔ Base64: Convert hexadecimal strings to Base64 or Base64 to hex
- Multi-selection support: Process multiple selections at once
- Smart clipboard: Automatically copies results to clipboard while replacing in-place
- Clear error messages: Helpful feedback when input format is invalid
| Command | Windows/Linux | Mac |
|---|---|---|
| Encode Text to Base64 | Ctrl+K Ctrl+4 |
⌘+K ⌘+4 |
| Decode Base64 to Text | Ctrl+K Ctrl+5 |
⌘+K ⌘+5 |
| Encode Hex to Base64 | Ctrl+K Ctrl+6 |
⌘+K ⌘+6 |
| Decode Base64 to Hex | Ctrl+K Ctrl+7 |
⌘+K ⌘+7 |
- Select the text you want to encode/decode
- Press the appropriate keyboard shortcut
- The selected text will be replaced with the result
- The result is also copied to your clipboard
- Select the text you want to encode/decode
- Open Command Palette (
Ctrl+Shift+P/⌘+Shift+P) - Type "Base64" to see available commands
- Select the desired operation
You can select multiple pieces of text (using Ctrl+Click / ⌘+Click) and encode/decode them all at once. Each selection will be processed independently.
- Input:
Hello World - Output:
SGVsbG8gV29ybGQ=
- Input:
SGVsbG8gV29ybGQ= - Output:
Hello World
- Input:
48656c6c6f20576f726c64 - Output:
SGVsbG8gV29ybGQ=
- Input:
SGVsbG8gV29ybGQ= - Output:
48656c6c6f20576f726c64
The extension validates input before processing:
- Invalid Base64: Shows "Selected text is not valid Base64"
- Invalid Hex: Shows "Selected text is not valid hexadecimal"
- Odd-length Hex: Shows "Hexadecimal string must have even length"
- Empty Selection: Shows "No text selected for [operation]"
- Download the
.vsixfile - In VS Code, open Command Palette (
Ctrl+Shift+P/⌘+Shift+P) - Run "Extensions: Install from VSIX..."
- Select the downloaded file
- Clone this repository
- Run
npm installto install dependencies - Run
npm run compileto build the extension - Press
F5in VS Code to run the extension in a new Extension Development Host
- Node.js (v14 or higher)
- VS Code (v1.74.0 or higher)
- TypeScript
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode (auto-compile on changes)
npm run watch
# Package extension
vsce packageMIT