← Go back

Last updated: Mar 11, 2021

px → css

Turn pixel art into HTML/CSS code. This page can be downloaded and used offline.

Credit to Tim Down on Stack Overflow for his RGB to hex code snippet.

1. Upload

Warning: .png files only. Keep the image size low; the output text can get extremely large, if the page doesn't crash first.

2. Name

Give the element a unique ID so the style can be applied properly.

3. Scale

Set the scale of the art. You don't need to resize your image in an image editing application.

4. Generate


Paste this into the html of your website.


Paste this into your stylesheet or inside of <style> tags.