Skip to main content

SteganoHide

Hide secret text messages inside perfectly normal-looking PNG images — and pull them back out again.

SteganoHide in Action

PyPI Python License: MIT

→ Try it: Install from PyPI


Quick Start

pip install steganohide
steganohide

That's it. The tool launches an interactive menu — no extra setup needed.

Windows users: If steganohide doesn't work after installing, run it with the full path:

C:\Users\YOUR_USERNAME\AppData\Local\Python\pythoncore-3.14-64\Scripts\steganohide.exe

Or add the Scripts folder to your PATH.


Features

  • Encode any text message into a standard PNG image with zero visible change
  • Decode hidden messages back out of encoded images instantly
  • Works on any PNG image — photos, screenshots, artwork, etc.
  • Uses a stop signal so the decoder knows exactly where your message ends
  • Simple interactive CLI menu — no flags or arguments to memorize
  • Pure Python with a single dependency (Pillow)

How to Run Locally

Requires Python 3.8+.

# Clone the repo
git clone https://github.com/ivadebandit/steganography-tool.git
cd steganography-tool

# Install dependencies
pip install pillow

# Run the tool
python steg_tool.py

You'll see:

================================
   Image Steganography Project
================================
1 - Hide a secret message (Encode)
2 - Reveal a secret message (Decode)

Enter 1 or 2:

Example Usage

Hiding a message:

Enter 1 or 2: 1

--- ENCODER ---
Path to your original image (e.g. photo.png): examples/picture.png
Secret message to hide: meet me at midnight
Save encoded image as (e.g. secret.png): examples/secret.png

Success! Encoded image saved as: 'examples/secret.png'
To a human viewer it looks completely normal.

Revealing it:

Enter 1 or 2: 2

--- DECODER ---
Path to the encoded image (e.g. secret.png): examples/secret.png

Scanning image: 'examples/secret.png'
Reading hidden data from pixels...

Hidden message revealed: 'meet me at midnight'

How It Works

Every PNG pixel has three color channels: Red, Green, and Blue (values 0–255). The ASCII character set also maps every printable character to a number 0–127 — which fits perfectly inside that 0–255 range.

SteganoHide overwrites the Red channel of successive pixels with the ASCII value of each character in your message. The human eye can't detect a difference between a Red value of 82 (background color) and 72 (the letter 'H'). But Python can read it back precisely.

A stop signal (Red = 0) is written after the final character so the decoder knows when to stop. The Green and Blue channels are never touched, preserving the image's appearance.

'H' → ord('H') → 72  → stored in pixel (0,0) Red channel
'I' → ord('I') → 73  → stored in pixel (1,0) Red channel
 0  (stop)            → stored in pixel (2,0) Red channel

Why PNG and not JPEG? JPEG compression is lossy — it rounds pixel values during save, destroying the hidden data. PNG is lossless, so pixel values are preserved exactly after save.


Project Structure

steganography-tool/
├── steg_tool.py       ← main CLI tool (encode + decode logic)
├── pyproject.toml     ← packaging config for PyPI
├── requirements.txt   ← Pillow dependency
├── LICENSE            ← MIT License
├── demo.gif           ← animated demo
└── examples/
    ├── picture.png    ← original input image
    └── secret.png     ← encoded output image

Limitations

  • Messages must be shorter than the total pixel count of the image
  • Only works with PNG files (JPEG will corrupt the hidden data on save)
  • Only ASCII characters are supported (values 0–127)
  • A Red channel value of 0 in the original image will be mistaken for the stop signal — avoid pure black images

Credits

Built with Pillow, the Python Imaging Library fork.


Made for Hack Club Stardance — a summer of building real things.

Metadata

Release files for steganohide 1.1.2

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

Source distribution (sdist)

Source distribution for steganohide 1.1.2
File Size Uploaded Provenance Actions
steganohide-1.1.2.tar.gz 4.6 kB Without provenance Details for steganohide-1.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / steganohide-1.1.2.tar.gz

Download URL steganohide-1.1.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
27d7f380b89e4c95a82ed70036e969636af160035551b5f8e84e941132b75337
BLAKE2b-256 checksum
How to use checksums
5708f1b75f0110b83a4678134a1f7aa87206c8b6d20361604d487c66a57c199c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / steganohide-1.1.2-py3-none-any.whl

Download URL steganohide-1.1.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6ea09968a8d5a4d37d0c2bf59feb69a480eab027015751125bd3a92e1c17961
BLAKE2b-256 checksum
How to use checksums
b95667158accafe546275784458afc2ad42fa53b1a79c53fe5cbd74e395b973a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for steganohide 1.1.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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