7,380 open-source and SaaS tools, with GitHub stats refreshed every day.

img2css

Open source

img2css converts any image to pure CSS box-shadows or an embedded base64 image, as a small browser-based design tool.

javier.xyz
img2css homepage screenshot
GitHub stars
2.5k
Last commit
1 mo ago
Repository age
11 years
Version
v1.1.0
Licence
BSD-3-Clause
Self-hosted
Yes

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
Built with
JavaScript
React
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

SaaS alternatives to img2css

See all