Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Base64 & Hex Encoder/DecoderNew to Visual Studio Code? Get it now.
Base64 & Hex Encoder/Decoder

Base64 & Hex Encoder/Decoder

Ufuk

|
16 installs
| (1) | Free
Quickly encode and decode Base64 and Hex strings with keyboard shortcuts
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Base64 & Hex Encoder/Decoder

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

  1. Select the text you want to encode/decode
  2. Press the appropriate keyboard shortcut
  3. The selected text will be replaced with the result
  4. The result is also copied to your clipboard

Using Command Palette

  1. Select the text you want to encode/decode
  2. Open Command Palette (Ctrl+Shift+P / ⌘+Shift+P)
  3. Type "Base64" to see available commands
  4. 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

  1. Download the .vsix file
  2. In VS Code, open Command Palette (Ctrl+Shift+P / ⌘+Shift+P)
  3. Run "Extensions: Install from VSIX..."
  4. Select the downloaded file

From Source

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run compile to build the extension
  4. 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

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft