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
- Tags
- css
- image-converter
- pixel-art
- box-shadow
- design-tool
- react
- javascript
- base64
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 Animockup. SaaS products in the same category include Anima, Jitter and UXPin.
- Is img2css actively maintained?
- Yes. The most recent commit to img2css was on 23 August 2026, and the latest release is v1.1.0, published on 2 July 2021. The project has 2.5k stars on GitHub.
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.4kAnimockup
Design
Create animated mockups in the browser 🔥
MIT★ 1.9k
OpenPencil
Design
The world's first open-source AI-native vector design tool and the first to feature concur
MITvs Figma★ 6.1k
Poster Design
Design
迅排设计 - 图片编辑器、AI 在线海报设计,仿稿定设计,适用于多种场景:海报生成、电商产品图、文章长图、视频/公众号封面等。A beautiful online image de
AGPL-3.0vs Adobe Express★ 4.9k
Doop
Design
The open-source alternative to Paper.design. A multiplayer design canvas where humans and
AGPL-3.0vs Figma★ 789
SaaS alternatives to img2css
See all
Anima
Design
Design-to-code platform that converts Figma designs into React, HTML and other code
SaaS
Jitter
Design
Browser-based motion design tool for animated graphics and videos
SaaS
UXPin
Design
Design and prototyping tool with code-backed components
SaaS
Adobe Creative Cloud
Design
Subscription bundle of Adobe design, photo, video and document apps
SaaS
Adobe Express
Design
Browser and mobile design tool for social graphics and short videos
SaaS
Adobe Fresco
Design
Drawing and painting app from Adobe with raster and vector brushes for tablets
SaaS

