PNG Grid Drawer

Uploads a PNG and draws horizontal and vertical lines over it at a chosen pixel spacing and thickness, alpha-blending the grid color onto the existing image so a semi-transparent grid color still shows the picture underneath. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool overlays an evenly-spaced grid of lines onto a PNG, computed entirely client-side.

It's useful for adding reference guides, pixel-art grids, or print-layout alignment lines directly onto an image.

What Is PNG Grid Drawer?

A grid-drawing tool that paints horizontal and vertical lines at a fixed pixel interval across the image, alpha-blending the chosen line color onto the existing pixels rather than replacing them outright.

The line spacing, thickness, and color/opacity are all configurable.

How PNG Grid Drawer Works

Starting from the top-left corner, the tool draws a vertical line every `cellSize` pixels and a horizontal line every `cellSize` pixels, each `lineThickness` pixels wide.

Each line pixel is composited over the existing pixel using standard alpha blending, so a semi-transparent line color still lets the underlying image show through.

When To Use PNG Grid Drawer

Use it to add a pixel-art reference grid over a sprite for size and alignment checking.

It's also useful for creating a print-layout guide grid directly baked into a design mockup.

Often used alongside PNG Parts Splitter and PNG Multiplier.

Features

Advantages

  • Runs entirely client-side; your image never leaves the browser.
  • Alpha-blended lines let the underlying image show through instead of being fully occluded.
  • Configurable spacing, thickness, and color for a wide range of grid styles.

Limitations

  • The grid always starts at the top-left corner (0,0); it can't be offset to align with off-grid content.
  • Lines are drawn as hard-edged rectangles, not antialiased, matching this site's other pixel-level effect tools.

Examples

Add a pixel-art reference grid

Input

A 64x64 PNG sprite, cell size 8, thickness 1, black at 40% opacity

Output

A 64x64 PNG with a faint 8x8 grid overlaid, the sprite still visible underneath

The semi-transparent black lines mark 8-pixel boundaries without hiding the sprite's own colors.

Add a bold layout guide grid

Input

A 800x600 PNG mockup, cell size 100, thickness 2, red at full opacity

Output

An 800x600 PNG with solid red gridlines every 100 pixels

A fully opaque grid color completely replaces the pixels it covers.

Best Practices & Notes

Best Practices

  • Use a lower opacity grid color so the underlying image stays legible through the lines.
  • Choose a cell size that evenly divides your image's dimensions for a clean, complete grid at the edges.

Developer Notes

The pure grid-drawing math lives in a lib function operating on a plain Uint8ClampedArray pixel buffer with no DOM dependency, alpha-blending each line pixel with a small local compositing helper rather than simply overwriting existing pixel values.

PNG Grid Drawer Use Cases

  • Overlaying a pixel-art reference grid on a sprite
  • Adding print-layout alignment guides to a mockup
  • Creating graph-paper-style backgrounds

Common Mistakes

  • Expecting the grid to start from the image's center — it always starts at the top-left corner.
  • Using a fully opaque grid color and being surprised the underlying image is hidden along every line.

Tips

  • Combine with the parts splitter tool to preview exactly where a grid split would land before actually cutting the image.
  • Use a contrasting grid color for dark images and a darker one for light images to keep the lines visible.

References

Frequently Asked Questions