๐Ÿ–ผ๏ธ Image to CSS Art

What Is an Image to CSS Art Converter?

This tool transforms a raster image into pure CSS โ€” rendering every pixel as a box-shadow value on a single HTML element. The result is a visual reproduction of your photo built entirely from CSS, with no <img> tag or background-image in sight. It is part art experiment, part technical showcase.

Upload any image, choose your pixel resolution (lower means more abstract, higher means more faithful), and the tool generates the CSS instantly. The output is a single div with hundreds or thousands of box-shadow declarations that paint the image pixel by pixel. Copy it, paste it into a CodePen, and watch people wonder how it is done.

How to Use This Tool

  1. Upload your source image โ€” Drag and drop or select any JPG, PNG, or WebP file. Smaller, simpler images with bold colors work best for recognizable results.
  2. Set the pixel resolution โ€” Resolution sets how many cells the image is resampled to across (8 to 128; rows follow the aspect ratio). Pixel Size sets how big each cell is drawn (1 to 16 px). Low resolution gives chunky pixel art; high resolution keeps more detail but grows the CSS fast.
  3. Preview the CSS rendering โ€” The tool shows a live preview of the CSS art next to your original image so you can compare fidelity and adjust resolution before exporting.
  4. Copy the generated CSS โ€” Click the copy button to grab the CSS. Paste it into any HTML file โ€” the art is a single div with an inline or stylesheet-defined box-shadow property.

Worked example: CSS size for a 16:9 photo

On October 12, 2026 we loaded a 1920 ร— 1080 photo into the tool in Chromium 141, stepped the Resolution slider through five values in box-shadow mode and measured the CSS copied with Copy CSS, plus its gzip size (what a server sends).

ResolutionGridShadowsCSSgzip -9
1616 ร— 91444.0 KBโ€”
3232 ร— 1857615.7 KBโ€”
48 (default)48 ร— 271,29635.7 KB8.3 KB
6464 ร— 362,30463.8 KBโ€”
128 (maximum)128 ร— 729,216257.9 KB58.2 KB

Frequently Asked Questions

Is CSS art practical for production websites?+
Rarely. One shadow per visible cell adds up quickly: a 64x64 export is about 4,096 shadows and roughly 115 KB of CSS, and 128x128 is about 16,000 shadows and 460 KB. It suits demos, portfolio pieces, talks and learning exercises.
What limits the image size?+
The Resolution slider stops at 128 cells across. Beyond that the CSS gets very large and every shadow has to be painted, so pages slow down on scroll and resize. Most recognisable results sit between 32 and 64 cells.
Can I animate CSS art?+
Yes, by transitioning box-shadow from one export to another at the same resolution so both lists have the same number of shadows. Expect it to be heavy: the browser repaints every shadow on every frame.
Does this work with transparent images?+
Yes. With Skip transparent on, cells under 50% opacity are left out and the background colour shows through; partly transparent cells keep their alpha as an rgba() colour. Turn the option off to keep every cell.
What is the difference between box-shadow and grid mode?+
Box-shadow mode paints the whole picture from one element's shadows, so the HTML is two divs and the CSS carries the image. Grid mode writes one div per cell with its own background colour, so the HTML is large but each cell can be styled or animated on its own. Both were checked to reproduce every cell of a 16x12 test image exactly.
Can I export the result as an image instead of CSS?+
Not as a PNG. Download HTML saves a standalone page with the art and your background colour; open it in a browser and take a screenshot if you need an image.
What size image should I upload for best results?+
Any size works, because the image is resampled to your Resolution setting, but bold shapes and flat colours survive resampling far better than detailed photos. Crop to the subject first so the cells are spent on it.
Does the output work in any browser?+
Yes. It uses plain box-shadow (or CSS grid in grid mode), which every current browser supports. The practical limit is painting time on large exports, not support.

๐Ÿ“– Learn More

Related Article CSS Shapes: Dividers & Triangles โ†’ Related Article CSS Loading Animations, Filters & Glow Effects โ†’

Built by Derek Giordano ยท Part of Ultimate Design Tools

Privacy Policy ยท Terms of Service