About img2css
img2css is a small web tool that converts images into CSS. It was made by javierbyte and offers two outputs: a pure CSS shadow matrix, where each pixel of a resized image becomes a box-shadow on a single-pixel div, and a base64 output that embeds the whole image file inside the markup.
The README warns that the pure CSS output can become huge and is not recommended for production unless there is no other option, so it is mainly a creative or experimental tool for pixel art, small icons and demonstrations. The author points to related projects, including a programmatic canvas image utility and a per-pixel animation experiment.
The tool is built with JavaScript and React, licensed under BSD-3-Clause, and the static site is deployed to GitHub Pages, so it can be built and hosted anywhere. A hosted version is available at the author's site. It suits front-end developers and designers who enjoy CSS art or need a quick image to CSS conversion.
Key features
- Convert images to CSS box-shadows
- Base64 embedded image output
- Runs in the browser
- Pixel-art friendly results
- Static site that is easy to host
Good fit for
- Creating pixel-art images in pure CSS
- Embedding small images without external files
- Experimenting with CSS-based graphics
img2css: questions and answers
- What is img2css used for?
- img2css converts any image to pure CSS box-shadows or an embedded base64 image, as a small browser-based design tool. It is a good fit for creating pixel-art images in pure CSS, embedding small images without external files and experimenting with CSS-based graphics.
- Is img2css open source?
- Yes. img2css is open source under the BSD-3-Clause licence. Its source code is on GitHub at javierbyte/img2css and is written mainly in JavaScript.
- Is img2css free?
- Yes. img2css is open source, so the software itself is free to use. A managed cloud version is also available.
- What are some alternatives to img2css?
- Similar open-source tools in the Design category include CSS Wand, Visual Center and OpenPencil. SaaS products in the same category include Anima, Ditther and GenDesigns.
- Is img2css actively maintained?
- Yes. The most recent commit to img2css was on 30 October 2026, and the latest release is v1.1.0, published on 2 July 2021. The project has 2.5k stars on GitHub, with 13 added in the last 30 days.
Open-source alternatives to img2css
See all
CSS Wand
Design
🎨✨ Hover your wand and use your magic spell to copy beautiful css
MIT★ 1.2k
Visual Center
Design
Tool to better align logos in the center of a container.
BSD-3-Clause★ 1.4k
OpenPencil
Design
Generate complete, multi-screen product interfaces on a live canvas. Refine every layer wi
MITvs Figma★ 7.2k
Doop
Design
The open-source alternative to Paper.design. A multiplayer design canvas where humans and
AGPL-3.0vs Figma★ 2k
Poster Design
Design
迅排设计 - 图片编辑器、AI 在线海报设计,仿稿定设计,适用于多种场景:海报生成、电商产品图、文章长图、视频/公众号封面等。A beautiful online image de
AGPL-3.0vs Adobe Express★ 5kGlisp
Design
Glisp is a Lisp-based design tool that combines generative approaches with traditional des
MIT★ 1.2k
SaaS alternatives to img2css
See all
Anima
Design
Design-to-code platform that converts Figma designs into React, HTML and other code
SaaS
Ditther
Design
Browser-based editor for posters, graphics and animations using dithering, halftone and ASCII effects
SaaS
GenDesigns
Design
Generates mobile app screens with AI from a described app idea, no design skills required
SaaS
Jitter
Design
Browser-based motion design tool for animated graphics and videos
SaaS
MiroMiro
Design
Turn any website into copy-paste code, colors, fonts and assets in one click
SaaS
ResetUI
Design
Redesigns an existing landing page from its URL into a modern, production-ready website
SaaS

