A VS Code extension for quickly encoding and decoding Base64 and Hex strings directly in your editor.
Features
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
Keyboard Shortcuts
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
Usage
Using Keyboard Shortcuts
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
Using Command Palette
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
Multi-Selection
You can select multiple pieces of text (using Ctrl+Click / ⌘+Click) and encode/decode them all at once. Each selection will be processed independently.
Examples
Text to Base64
Input: Hello World
Output: SGVsbG8gV29ybGQ=
Base64 to Text
Input: SGVsbG8gV29ybGQ=
Output: Hello World
Hex to Base64
Input: 48656c6c6f20576f726c64
Output: SGVsbG8gV29ybGQ=
Base64 to Hex
Input: SGVsbG8gV29ybGQ=
Output: 48656c6c6f20576f726c64
Error Handling
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]"
Installation
From VSIX file
Download the .vsix file
In VS Code, open Command Palette (Ctrl+Shift+P / ⌘+Shift+P)
Run "Extensions: Install from VSIX..."
Select the downloaded file
From Source
Clone this repository
Run npm install to install dependencies
Run npm run compile to build the extension
Press F5 in VS Code to run the extension in a new Extension Development Host
Development
Prerequisites
Node.js (v14 or higher)
VS Code (v1.74.0 or higher)
TypeScript
Build
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode (auto-compile on changes)
npm run watch
# Package extension
vsce package