A production-ready image glitching tool that manipulates raw byte data while preserving file headers to maintain validity. Create stunning glitch art by corrupting images at the hex level with surgical precision or chaotic randomness.
- Header Protection: Adjustable "Safe Zone" to protect file headers (e.g., first 500 bytes) from corruption
- Hex Preview: View the raw hex data of your image in real-time
- Find & Replace: Target specific byte sequences (e.g., replace all
FFwith00) for structured glitching - Random Glitch: Randomly modify bytes with multiple algorithms (Random, Increment, XOR, etc.)
- Real-time Preview: See the results instantly with automatic preview updates
- Production-Ready: Comprehensive input validation, error handling, and security hardening
Download the latest release for your platform - no Python installation required:
- Windows:
HexGlitcher-Windows-Portable.zip- Portable EXE (no installation) - Linux:
HexGlitcher-x86_64.AppImage- Universal AppImage - macOS:
HexGlitcher-macOS.dmg- Disk image installer
Windows:
- Download and extract
HexGlitcher-Windows-Portable.zip - Run
HexGlitcher.exe
Linux:
chmod +x HexGlitcher-x86_64.AppImage
./HexGlitcher-x86_64.AppImagemacOS:
- Open
HexGlitcher-macOS.dmg - Drag
HexGlitcher.appto Applications - Right-click β Open (first time only)
- Python 3.8 or higher
- Tkinter (usually included with Python)
# Clone the repository
git clone https://github.com/willbearfruits/hexglitcher.git
cd hexglitcher
# Install dependencies
pip install -r requirements.txtpython main.pyOr use the convenience script:
./run.sh # Linux/macOS- Run the tool:
python main.py
- Click Load Image to select a file (JPG, PNG, BMP, GIF, etc.).
- Adjust Header Protection if the file breaks immediately (Try increasing to 1000+ for complex PNGs).
- Use Find & Replace or Random Corruption to glitch the image.
- Click Save Result when satisfied.
-
JPEG (JPG): Very sensitive to corruption. Small changes can cause massive visual shifts
- Keep "Intensity" high (1 change per 5000+ bytes)
- Header protection around 600-800 bytes
- Start conservative and increase corruption gradually
-
BMP: Very stable and predictable
- Can use aggressive glitch settings
- Great for learning and experimentation
- Low header protection (200-400 bytes) usually sufficient
-
PNG: Uses checksums (CRC) for integrity checking
- Some viewers will reject corrupted PNGs
- Most browsers handle minor corruption gracefully
- Try increasing header protection if it breaks completely
- Glitch gently or specifically target non-critical chunks
-
GIF: Animation frames can be individually corrupted
- Moderate sensitivity
- Interesting results with find/replace on color tables
-
WebP: Modern format with good corruption tolerance
- Similar behavior to PNG
- Header protection around 500-700 bytes
HexGlitcher includes production-grade security hardening:
- β File size validation (100MB limit)
- β File type validation (images only)
- β Integer input validation
- β Hex input validation
- β Path traversal protection
- β System directory write protection
- β Comprehensive error handling
- β Logging system for debugging
Want to build your own executables? See BUILDING.md for detailed instructions.
# Install build dependencies
pip install -r requirements-build.txt
# Build for your platform
python build.pyOutputs will be in the dist/ directory.
image-glitcher/
βββ main.py # Main application code
βββ hexglitcher.spec # PyInstaller configuration
βββ build.py # Cross-platform build script
βββ requirements.txt # Runtime dependencies
βββ requirements-build.txt # Build dependencies
βββ README.md # This file
βββ BUILDING.md # Build instructions
βββ LICENSE # MIT License
βββ .github/
βββ workflows/
βββ build-release.yml # Automated builds
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Created with Claude Code
- Production-ready image glitching tool
- Windows, Linux, and macOS support
- Comprehensive security hardening
- Real-time preview and hex display
- Multiple glitch algorithms
- Header protection mechanism
- Find & replace functionality
- Logging system
- Issues: Report bugs and request features on GitHub Issues
- Documentation: See BUILDING.md for build instructions
- License: MIT (see LICENSE)
- Built with Pillow for image processing
- Uses PyInstaller for executable creation
- GUI built with Tkinter