██████╗ ██████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ██╗
██╔══██╗██╔════╝ ██║ ██║╚══██╔══╝██╔═══██╗██╔═══██╗██║
██████╔╝███████╗ ███████║ ██║ ██║ ██║██║ ██║██║
██╔══██╗██╔═══██╗╚════██║ ██║ ██║ ██║██║ ██║██║
██████╔╝╚██████╔╝ ██║ ██║ ╚██████╔╝╚██████╔╝███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
- Multi format encoding/decoding CLI with recursive layer detection for security analysis.
Features
- Encode/Decode across Base64, Base64URL, Base32, Hex, and URL encoding formats
- Auto-detect encoding format with confidence scoring
- Peel recursively through multi-layered encoding (the kind attackers use to evade WAFs and IDS)
- Chain multiple encoding steps together for testing obfuscation patterns
- Pipeline-friendly output for integration into security workflows
Quick Start
uv sync
uv run b64tool encode "Hello World"
uv run b64tool decode "SGVsbG8gV29ybGQ="
uv run b64tool detect "SGVsbG8gV29ybGQ="
uv run b64tool peel "NjQ0ODY1NmM2YzZmMjA1NzZmNzI2YzY0"
uv run b64tool chain "secret" --steps base64,hex,url
Installation
uv sync --all-extras
Usage
Encode
b64tool encode "Hello World" # Base64 (default)
b64tool encode "Hello World" --format hex # Hex
b64tool encode "Hello World" --format base32 # Base32
b64tool encode "hello world&foo=bar" --format url # URL encoding
echo "piped input" | b64tool encode # Stdin
b64tool encode --file secret.txt # File input
Decode
b64tool decode "SGVsbG8gV29ybGQ=" # Base64 (default)
b64tool decode "48656c6c6f" --format hex # Hex
b64tool decode "JBSWY3DP" --format base32 # Base32
Detect
Identifies the encoding format with confidence scoring:
b64tool detect "SGVsbG8gV29ybGQ="
Peel (Recursive Layer Detection)
The signature feature. Automatically peels back multiple encoding layers, the way real malware and attack payloads obfuscate data:
b64tool peel "NjQ0ODY1NmM2YzZmMjA1NzZmNzI2YzY0"
Chain
Build multi-layered encodings for testing WAF rules, IDS signatures, or understanding obfuscation:
b64tool chain "alert('xss')" --steps base64,hex,url
Security Context
Encoding layering is a real attack technique:
- WAF Bypass: Double-encoding payloads to slip past web application firewalls (OWASP)
- Malware Obfuscation: DARKGATE malware uses custom Base64 alphabets with randomized shuffling
- Data Exfiltration: Base64-encoded data hidden in DNS queries and HTTP headers
- IDS Evasion: Multi-layer encoding to avoid signature-based detection
This tool helps security professionals analyze and understand these patterns.
License
MIT
Metadata
Release files for b64tool 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| b64tool-0.1.0.tar.gz | 48.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| b64tool-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.9 kB
Release files / b64tool-0.1.0.tar.gz
| Download URL | b64tool-0.1.0.tar.gz |
|---|---|
| Size | 48.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9915d58cec5a785b66740960ce80dc4c31708911644ffaa7bea1bff5ecfa96a5
|
|
BLAKE2b-256 checksum How to use checksums |
730d0237cb2a31b1f04ecee8d88604fe3968d250f9c1c5e8162224679883ae8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 9, 2026.
Transparency logRelease files / b64tool-0.1.0-py3-none-any.whl
| Download URL | b64tool-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19dc36c79b0691c196edd7a8c6f51b29c09548bd3123edf37f6b8044ad7e905e
|
|
BLAKE2b-256 checksum How to use checksums |
9096a270fe59a845862741eea3438b6f14c0509e68b97f07113f32a4ce9ceb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 9, 2026.
Transparency logSecurity for b64tool 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for b64tool-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.