Skip to main content

Decodify

Decodify is a Python package that automatically detects, decodes, and encodes messages using 61 encoding formats, classical ciphers, and specialized algorithms. It provides a Python API and a command-line interface (CLI) with support for file operations and configurable cipher parameters.


Features

  • 61 algorithms covering base encodings, text formats, classical ciphers, compression, and historical codes.
  • Automatic detection with priority for distinctive encoding formats.
  • Encoding and decoding through a unified API and CLI.
  • Keyed ciphers with configurable keys and parameters.
  • File processing with input and output file support.
  • Python API for integration into other applications.
  • Algorithm listing to explore all supported formats.
  • Probability scores for automatic detection results.

Supported Algorithms

Category Supported Algorithms
Base Encodings base32, base32hex, base36, base45, base58, base58_flickr, base58_ripple, base64, base64url, base85, base91, z85
Text & Web Encodings ascii, decimal, hex, binary, octal, url, escape, quoted_printable, html_decimal, html_entities, html_hex, unicode_codepoint, unicode_escape, utf8, utf16, utf32, punycode
Classical & Modern Ciphers affine, atbash, autokey, beaufort, caesar, gronsfeld, hill, playfair, porta, rail_fence, scytale, substitution, vigenere, xor, rot5, rot13, rot18, rot47
Historical & Specialty Formats baconian, brainfuck, morse, nato, polybius, tap_code, uuencode, jwt
Compression Formats bz2, deflate, gzip, lzma, zlib

Installation

Install from PyPI:

pip install decodify

Or install from source:

git clone https://github.com/Ishanoshada/Decodify.git
cd Decodify
pip install -e .

Quick Start – Python API

from decodify import decode_message, encode_message, list_algorithms

# Automatically detect and decode
decoded, probabilities = decode_message("aGVsbG8=")

print(decoded)
# hello

print(probabilities)
# {'base64': 1.0}

# Decode using a specific algorithm
decoded, _ = decode_message("uryyb", algorithm="rot13")
print(decoded)
# hello

# Decode with cipher parameters
decoded, _ = decode_message(
    "ciphertext",
    algorithm="vigenere",
    key="LEMON"
)

decoded, _ = decode_message(
    "Uryyb",
    algorithm="caesar",
    shift=13
)

# Encode messages
print(encode_message("hello", "base64"))
# aGVsbG8=

print(encode_message("hello", "hex"))
# 68656c6c6f

print(encode_message("SOS", "morse"))

print(encode_message("secret", "xor", key="key"))

# List available algorithms
print(list_algorithms())

Command-Line Interface (CLI)

Display help

decodify --help

List supported algorithms

decodify --list

Automatic detection and decoding

decodify "aGVsbG8="

Example output:

Decoded Message: hello
Algorithm Probabilities:
  base64: 1.000

Decode with a specific algorithm

decodify "aGVsbG8=" --algorithm base64

decodify "68656c6c6f" --algorithm hex

decodify "uryyb" --algorithm rot13

decodify ".... . .-.. .-.. ---" --algorithm morse

decodify "01101000 01100101 01101100 01101100 01101111" --algorithm binary

Encode messages

Use -e or --encode to enable encoding mode.

decodify "hello" --algorithm base64 --encode

decodify "hello" --algorithm hex --encode

decodify "hello" --algorithm binary --encode

decodify "hello" --algorithm morse --encode

decodify "hello" --algorithm rot13 --encode

Example output:

Encoded Message: aGVsbG8=

Cipher parameters

Caesar cipher

# Encode
decodify "hello" --algorithm caesar --encode --shift 3

# Decode
decodify "khoor" --algorithm caesar --shift 3

Vigenère cipher

# Encode
decodify "hello" --algorithm vigenere --encode --key SECRET

# Decode
decodify "ciphertext" --algorithm vigenere --key SECRET

XOR cipher

decodify "hello" --algorithm xor --encode --key secret

decodify "encoded_text" --algorithm xor --key secret

Rail Fence cipher

decodify "hello" --algorithm rail_fence --encode --rails 3

decodify "encoded_text" --algorithm rail_fence --rails 3

Affine cipher

decodify "hello" --algorithm affine --encode --a 5 --b 8

decodify "encoded_text" --algorithm affine --a 5 --b 8

File operations

Read and decode a file:

decodify --file encoded.txt

Decode using a specific algorithm:

decodify --file encoded.txt --algorithm base64

Save decoded output:

decodify --file encoded.txt --algorithm base64 --output decoded.txt

You can also use a positional file path:

decodify encoded.txt --algorithm base64 --output decoded.txt

CLI Options

Option Description
-h, --help Display help information
-f, --file Read input from a file
-o, --output Save the result to a file
-a, --algorithm Select a specific algorithm
-e, --encode Encode instead of decode
--key Key for keyed ciphers
--shift Caesar cipher shift (default: 3)
--rails Rail Fence rail count (default: 3)
--a Affine cipher coefficient A
--b Affine cipher coefficient B
-l, --list List supported algorithms

Automatic Detection

Decodify uses heuristic detection to identify possible encoding formats.

Distinctive formats are prioritized, including:

  • Base64 and other recognizable base encodings
  • Morse code
  • NATO phonetic alphabet
  • Brainfuck
  • Tap Code
  • Polybius
  • Baconian
  • UUEncode
  • JWT
  • Other recognizable formats

Note: Automatic detection cannot reliably identify every encoding or cipher. Ambiguous classical ciphers such as ROT13, Caesar, Vigenère, XOR, Affine, and Rail Fence should be selected explicitly using --algorithm and the required parameters.


Testing

Run the test suite:

python -m pytest tests/ -v

Run tests with coverage:

python -m pytest tests/ -v --cov=decodify --cov-report=term-missing

Current test status:

64 passed
0 failed
67% code coverage

Project Structure

decodify/
├── algorithms/
│   ├── __init__.py
│   ├── base64.py
│   ├── base32.py
│   ├── morse.py
│   ├── caesar.py
│   ├── ...
├── __init__.py
├── cli.py
└── decodify.py

tests/
└── test_decodify.py

setup.py
README.md

Contributing

Contributions are welcome!

To add a new algorithm:

  1. Create a module under decodify/algorithms/.
  2. Implement the detection, decoding, and encoding functions where applicable.
  3. Register the algorithm in decodify/algorithms/__init__.py.
  4. Add tests under tests/.
  5. Submit a pull request.

License

MIT License

Author

Ishan Oshada


Decodify – Detect, Decode, and Encode. 🚀

Metadata

Release files for decodify 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decodify 0.1.5
File Size Uploaded Provenance Actions
decodify-0.1.5.tar.gz 33.6 kB With provenance Details for decodify-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for decodify 0.1.5
File Interpreter ABI Platform Actions
decodify-0.1.5-py3-none-any.whl Python 3 none any Details for decodify-0.1.5-py3-none-any.whl

Total release size: 84.5 kB

Release files / decodify-0.1.5.tar.gz

Download URL decodify-0.1.5.tar.gz
Size 33.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9dcac120780f4a7ac0dac0c461acb9d4bef91bfeb3e28410b98bd3591573fa0b
BLAKE2b-256 checksum
How to use checksums
3b44be18b7b0b5643f7298fae96e54a74838bfd8aa335ef74ba726bc37abbbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Release files / decodify-0.1.5-py3-none-any.whl

Download URL decodify-0.1.5-py3-none-any.whl
Size 50.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d219b3e5a9b4a23ec02f8bf32012a365d1050059fca8dab87971b5405b64d57e
BLAKE2b-256 checksum
How to use checksums
69bd4fc630b0960ac2016080ff95cddcfb6e34f8455dc8a39a646b010f0a4d45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for decodify 0.1.5

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for decodify-0.1.5.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 Nov 26, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page