Back to the blog
JavaScript / DEVELOPMENT NOTES

Pixelator: a pixel art editor in your browser

An HTML5 and JavaScript editor for drawing, picking colours, and saving small images one pixel at a time.

Pixelator pixel art editor interface

Pixelator is a web application for drawing pixel art. I built it with HTML5 and JavaScript, without a UI framework: a canvas, a few tools, and a palette to get started.

Pixelator pixel art editor interface

Drawing tools

  • Pencil and eraser: draw freehand or remove pixels.
  • Paint bucket: fill connected areas with a flood-fill algorithm.
  • Shapes: draw lines, rectangles, and circles.
  • Colour picker: sample a colour from the image and keep drawing with it.
  • Load and save: open an image and save your work.

From the first pixel to a finished drawing

The editor is a place to experiment directly in the browser. Try a small palette and combine freehand drawing with shapes. The limits of the canvas can help you decide what to draw.

The repository shows how each tool is implemented and how the controls connect to the drawing itself.

Source code

Explore the project on GitHub

Written by Sergio Soriano

Development, curiosity, and shared projects.

About Sergio Soriano