I use a ruler when photographing small items to show their actual size, but I couldn’t find one that meets my specific needs. Most online ruler generators were too rigid, so I built and open-sourced this configurable double-ruler pattern generator to provide more flexibility.
This tool creates everything from standard office and architect’s scales to vertical level staffs, centering rulers, and conversion scales. Try the generator and view the examples below, and let me know your thoughts in the comments.
Ruler Pattern Generator App
Usage Description
Most fields accept inches, centimeters, millimeters, and pixels, including fractions. For example: 6.5 in, 2″, 42 cm, 0.4mm, or 720 px. If no unit is provided, the tool defaults to centimeters. All specified parameters are stored in the URL, so we can easily save or share ruler designs via the link.
Pixel Density ensures the generated image remains sharp for display and printing. You can select a predefined value from the drop-down list or customize it further via the URL. For optimal results, use 127 or 254 PPI (points per inch) for metric rulers; other values work well for imperial scales.
Next Step for Ruler Pattern Generator
The current version of the app generates raster images (PNG) of any PPI, which is perfect for printing on laser or ink printers. Generating a vector graphic file would be a good improvement, as it could be used to make rulers more efficiently with laser engravers, CNC machines, and plotters.
Examples of Ruler Designs
To demonstrate the tool’s flexibility, I have put together five configurations. The examples below show how the generator can be adjusted for various tasks, from standard measurements to more specialized layouts.

Simple Office Ruler

Oversized tick marks and numbering

Dual-scale layout

Zero mark in the middle

Dual-scale thermometer
I used my software engineering skills to solve a practical workshop problem. Give the ruler pattern generator a try and let me know what you think in the comments.