CONVERT IMAGE TO PIXEL CODE
Upload an image, preview pixel art, and export pixel code as CSS or JSON.
Click or Drag Image Here
Supports JPG, PNG, WEBP
Upload an image to generate pixel code.
How to Convert Image to Pixel Code
- Upload Your Image: Choose a JPG, PNG, or WEBP from your device.
- Set Pixel Size: Increase pixel size for larger blocks, or decrease it for more detail.
- Generate Pixel Code: Export pixel code as CSS box-shadow or a JSON pixel array.
- Download: Save the pixel art as PNG, or download the pixel code file.
What Is Pixel Code?
Pixel code is a code representation of an image as a grid of colored pixels. Developers often use pixel code to recreate pixel art in CSS, store compact color maps in JSON, or generate sprites for games and UI components.
Pixel Code Formats
- CSS box-shadow: Render pixel art using a single div with box-shadow offsets.
- JSON pixel array: Export a 2D grid that you can feed into your own renderer.
- PNG export: Download the pixelated image as a PNG for quick sharing.
- Local processing: Everything runs in your browser for privacy.