
Base64 Encoder
- 46 installs
- 84 repo stars
- Updated January 28, 2026
- aidotnet/moyucode
base64-encoder is a Claude Code skill that encodes and decodes Base64, URL-safe Base64, and hex strings and files via a Python CLI.
About
base64-encoder is a Claude Code skill that encodes and decodes Base64, URL-safe Base64, and hexadecimal strings, including files. A developer runs scripts/base64_encoder.py with encode or decode plus text or a file path to convert data. It wraps Python's standard base64 module for quick data conversion tasks.
- Encodes and decodes Base64, URL-safe Base64, and hexadecimal strings
- Supports text input and file input/output via a CLI script
- Built on Python's standard base64 module
Base64 Encoder by the numbers
- 46 all-time installs (skills.sh)
- Ranked #324 of 550 CLI & Terminal skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
base64-encoder capabilities & compatibility
- Capabilities
- base64 encoding · data conversion
- Pricing
- Free
What base64-encoder says it does
Encode and decode Base64, URL-safe Base64, and hexadecimal strings with support for files.
python scripts/base64_encoder.py encode "Hello World"
npx skills add https://github.com/aidotnet/moyucode --skill base64-encoderAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 46 |
|---|---|
| repo stars | ★ 84 |
| Last updated | January 28, 2026 |
| Repository | aidotnet/moyucode ↗ |
What it does
Encode or decode Base64, URL-safe Base64, and hex strings or files via a CLI script.
Who is it for?
Quickly encoding or decoding Base64, URL-safe Base64, or hex data and files.
Skip if: Encryption or cryptographic hashing beyond simple encoding.
When should I use this skill?
A developer needs to convert data to or from Base64/hex.
What you get
Encoded or decoded output as text or a file.
- Encoded or decoded output text or file
By the numbers
- Handles 3 encodings (Base64, URL-safe Base64, hex)
Files
Base64 Encoder Tool
Description
Encode and decode Base64, URL-safe Base64, and hexadecimal strings with support for files.
Trigger
/base64command- User needs to encode/decode data
- User wants to convert binary to text
Usage
# Encode text
python scripts/base64_encoder.py encode "Hello World"
# Decode Base64
python scripts/base64_encoder.py decode "SGVsbG8gV29ybGQ="
# Encode file
python scripts/base64_encoder.py encode --file image.png --output image.b64
# URL-safe encoding
python scripts/base64_encoder.py encode "data" --url-safeTags
base64, encode, decode, binary, text
Compatibility
- Codex: ✅
- Claude Code: ✅
#!/usr/bin/env python3
"""
Base64 Encoder/Decoder Tool
Based on Python's base64: https://github.com/python/cpython
Usage:
python base64_encoder.py encode "Hello World"
python base64_encoder.py decode "SGVsbG8gV29ybGQ="
python base64_encoder.py encode --file image.png
"""
import argparse
import base64
import sys
from pathlib import Path
def encode_data(data: bytes, url_safe: bool = False) -> str:
"""Encode bytes to Base64."""
if url_safe:
return base64.urlsafe_b64encode(data).decode('ascii')
return base64.b64encode(data).decode('ascii')
def decode_data(data: str, url_safe: bool = False) -> bytes:
"""Decode Base64 to bytes."""
if url_safe:
return base64.urlsafe_b64decode(data)
return base64.b64decode(data)
def main():
parser = argparse.ArgumentParser(description="Base64 encode/decode")
subparsers = parser.add_subparsers(dest='command', required=True)
# Encode
p_enc = subparsers.add_parser('encode', help='Encode to Base64')
p_enc.add_argument('text', nargs='?', help='Text to encode')
p_enc.add_argument('--file', '-f', help='File to encode')
p_enc.add_argument('--output', '-o', help='Output file')
p_enc.add_argument('--url-safe', '-u', action='store_true')
# Decode
p_dec = subparsers.add_parser('decode', help='Decode from Base64')
p_dec.add_argument('text', nargs='?', help='Base64 to decode')
p_dec.add_argument('--file', '-f', help='File containing Base64')
p_dec.add_argument('--output', '-o', help='Output file')
p_dec.add_argument('--url-safe', '-u', action='store_true')
args = parser.parse_args()
if args.command == 'encode':
if args.file:
with open(args.file, 'rb') as f:
data = f.read()
elif args.text:
data = args.text.encode('utf-8')
else:
data = sys.stdin.buffer.read()
result = encode_data(data, args.url_safe)
if args.output:
with open(args.output, 'w') as f:
f.write(result)
print(f"✓ Encoded to {args.output}")
else:
print(result)
elif args.command == 'decode':
if args.file:
with open(args.file, 'r') as f:
data = f.read().strip()
elif args.text:
data = args.text
else:
data = sys.stdin.read().strip()
result = decode_data(data, args.url_safe)
if args.output:
with open(args.output, 'wb') as f:
f.write(result)
print(f"✓ Decoded to {args.output}")
else:
try:
print(result.decode('utf-8'))
except UnicodeDecodeError:
print(f"Binary data ({len(result)} bytes)")
if __name__ == "__main__":
main()
Related skills
FAQ
What encodings does it support?
Base64, URL-safe Base64, and hexadecimal, with file support.
What is it based on?
Python's standard base64 module (cpython, PSF license).