Add a scale bar to a microscope image
Open a PNG or JPEG, enter the pixel size or measure a known distance on the picture, and download it with a clean, correctly sized scale bar. The tool runs entirely in this page: your image is never uploaded. Below it: the scale bar length calculator and the biology-class "actual size from a scale bar" calculation.
How to add a scale bar that is correct
- Get the pixel size. Best: from the original file's metadata (Fiji: Image › Properties; most microscope formats record it). Otherwise calculate it from the camera and objective with the pixel size calculator, or measure a stage micrometer.
- Use the full-resolution image. If you resized or cropped and rescaled the picture, the pixel size changed by the same factor. A 2× downscale doubles the µm per pixel.
- Choose a round length (1, 2, 5, 10, 20, 50, 100 µm…) of about 10–20 % of the image width, so it reads at a glance without covering the specimen.
- Place it in a quiet corner in a colour that contrasts with the background, and state the length on the bar or in the legend.
The tool above follows those rules: leave the length blank and it picks a round value near a fifth of the width. TIFF files cannot be opened by most browsers; save a PNG first (Fiji: File › Save As › PNG).
Scale bar formulas
bar length (px) = bar length (µm) ÷ pixel size (µm/px) · actual size = object length ÷ bar length × bar value
Worked example (figure): 0.25 µm per pixel, a 50 µm bar: 50 ÷ 0.25 = 200 pixels.
Worked example (biology question): on a printed micrograph the cell measures 36 mm with a ruler and the 10 µm scale bar measures 20 mm. Actual size = 36 ÷ 20 × 10 = 18 µm. Because both lengths are measured with the same ruler, their unit cancels; only the bar's value sets the answer's unit. The magnification of that print is 20 mm ÷ 10 µm = 20,000 µm ÷ 10 µm = ×2000.
Scale bars in Fiji and in SlideScope
Fiji / ImageJ: set or check the scale (Analyze › Set Scale), then Analyze › Tools › Scale Bar…, choose width, position and colour, and tick Overlay to keep the pixels untouched.
SlideScope: the viewer reads the pixel size from CZI, ND2, SVS, LIF, OME-TIFF and the other supported formats and shows a scale bar that follows the zoom. File › Make Figure… lays out panels with letters and scale bars and writes a Methods paragraph from the file's metadata; saving the figure comes with the 3-day free trial or a subscription. When a file has no pixel size, View › Set Pixel Size… adds one.
Questions
How do I add a scale bar to a microscope image?
You need the image's pixel size (µm per pixel). Divide the bar length you want by it to get the bar length in pixels, then draw it, or use the tool on this page, Fiji's Analyze › Tools › Scale Bar, or your microscope software.
How do I calculate the actual size of a specimen from a scale bar?
Measure the object and the scale bar with a ruler, divide the object length by the bar length and multiply by the bar's value: 36 mm ÷ 20 mm × 10 µm = 18 µm.
Is my image uploaded?
No. The image is read by your browser and drawn on a canvas in this page; nothing is sent to a server. Closing the tab discards it.
What length should a scale bar be?
A round number (1, 2, 5 × a power of ten) that spans roughly 10–20 % of the image width. Very short bars are hard to read; very long ones cover the specimen.
Can I add a scale bar to a TIFF?
Most browsers cannot display TIFF files, so save the image as PNG first. Desktop tools such as Fiji or SlideScope open the TIFF directly and read its calibration.
Is this tool free?
Yes. It runs in your browser and sends nothing anywhere. SlideScope, the desktop microscopy app made by the same team, is a paid app with a free preview.
Sources
Results are theoretical or arithmetic; check them against your instrument's documentation before relying on them for clinical or regulated work.
Measure on your real images
SlideScope opens 34 microscope and slide-scanner formats, CZI, ND2, SVS and LIF among them, with their own calibration, so lengths, areas, cell counts and scale bars come out in µm without setting anything up. Open a few of your own images with the free preview. Already decided? Subscribe now.