Skip to content

About

A browser-based tool to encrypt images into audio (WAV) and decrypt them back into images with lossless quality. Runs entirely in your browser, requires no server, and ensures privacy, speed, and security.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 SecurePixel - Image ↔ Audio Converter

SecurePixel is a client-side encryption tool that allows you to securely convert images into audio files (WAV) and then restore them back to their original form.
All processing happens directly in your browser (using JavaScript), ensuring privacy and no server uploads.


🚀 Features

  • 🛡️ Military-Grade Security – Data is compressed and encoded before embedding in audio.
  • ⚡ Fast Processing – Works entirely in your browser with optimized algorithms.
  • 🌐 No Server Required – 100% offline, nothing leaves your device.
  • 💫 Lossless Quality – The decrypted image is exactly the same as the original.
  • 🎨 Modern UI – Stylish gradient background, floating particles, and animations.

📸 How It Works

🔒 Encryption (Image → Audio)

  1. Read the Image File
    The selected image (PNG, JPG, JPEG, BMP, GIF) is loaded as raw binary data.

  2. Extract Metadata
    Image dimensions (width & height) are extracted and stored for later reconstruction.

  3. Compression
    The raw image data is compressed using pako.js (zlib/deflate).

  4. Metadata + Data Encoding
    A string is formed: IMGDATA:::

This ensures the audio file knows how to restore the image.

  1. Convert to Bytes
    The string is converted into a Uint8Array.

  2. Create WAV File
    A custom WAV file is generated:

  • Sample rate: 8000 Hz
  • Channels: Mono
  • Bit depth: 8-bit
  • Data chunk stores the encoded byte stream.
  1. Result
    A downloadable .wav file is provided.

🔓 Decryption (Audio → Image)

  1. Read WAV File
    The encrypted .wav is parsed and raw audio bytes are extracted.

  2. Extract Data String
    The audio bytes are decoded back into a UTF-8 string.

  3. Validate Format
    The tool checks that the data starts with the IMGDATA: marker.

  4. Parse Metadata
    Extracts:

  • Width
  • Height
  • Base64 encoded compressed data
  1. Decompression
    Base64 data → Binary buffer → Decompressed using pako.inflate.

  2. Rebuild Image
    The decompressed binary is wrapped in a Blob with type: image/png.

  3. Result
    The image is displayed on screen and can be downloaded in its original form.


📂 File Support

  • Encryption Input: PNG, JPG, JPEG, BMP, GIF
  • Decryption Input: WAV (generated by this tool)
  • Decryption Output: PNG

🛠️ Tech Stack

  • HTML5 / CSS3 – Modern UI with animations
  • JavaScript (Vanilla) – File handling, encoding, and decryption
  • pako.js – Compression (zlib/deflate)
  • Web APIs – FileReader, Blob, ArrayBuffer, DataView for binary manipulation

▶️ Usage

  1. Open the app in your browser (index.html).
  2. Drag & drop or click to upload an image.
  3. Click "Encrypt to Audio" → download your .wav file.
  4. Upload the .wav file in the Decrypt Audio section.
  5. Click "Decrypt to Image" → restore the original image.

⚖️ License

This project is open-source under the MIT License.
Feel free to use, modify, and share.


💡 Notes

  • The WAV files generated by this tool are not playable audio, but structured binary containers.
  • Only WAV files generated by SecurePixel can be decrypted correctly.

About

A browser-based tool to encrypt images into audio (WAV) and decrypt them back into images with lossless quality. Runs entirely in your browser, requires no server, and ensures privacy, speed, and security.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages