Turn a Photo into a Coloring Page

Turn any photo into a printable black-and-white coloring page with edge detection, right in your browser. Free, private, downloads as PNG or A4/Letter PDF.

🌐 Español

Drop your files here (.jpg, .jpeg, .png, .webp)

🔒 Private by design: your files are processed locally in your browser and never uploaded to any server.

A coloring page is line art: black outlines, white space in between, nothing else. Getting there from a photograph is a question of deciding which of the photo’s edges are real enough to draw, and this page hands you that decision as two numbers rather than a mystery preset.

Sobel gradients, and what the threshold number is measured in

Every photo you drop in is converted to a single gray channel, optionally blurred, and then run through the two classic 3x3 Sobel kernels, which measure how fast brightness is changing horizontally and vertically at each pixel. The two components are combined into one gradient magnitude, and any pixel whose magnitude reaches the Line threshold is painted pure black. Everything else is painted pure white.

The kernels are normalized by 4 on purpose, and it makes the slider mean something concrete. On a clean edge between two flat regions, the resulting magnitude comes out equal to the difference in their gray values: a step from 100 to 140 reports exactly 40. So the default threshold of 40 reads as “draw a line wherever brightness changes by at least 40 of 255 levels”, and the two pixel columns either side of a hard boundary both cross it, which is why a sharp edge comes back as a line roughly two pixels wide.

Detail blurs first, which can erase a weak edge completely

Detail is a Gaussian pre-smoothing radius, from 0 to 10, applied to the gray channel before any gradient is measured. At 0 the blur pass is skipped entirely and every speck of sensor noise and fabric texture gets a fair shot at becoming a line. At the default of 2 the kernel is five pixels wide, which is enough to settle down a typical phone photo.

The trade-off is sharper than it sounds. Blurring spreads a brightness step over several pixels, so the peak gradient at each one drops. In a hand-run test on a synthetic 40-level step, a Detail of 2 flattened it far enough that the default threshold caught nothing at all. On a contrasty subject that never happens; on a hazy or backlit one it happens easily. If a page comes back nearly blank, take Detail down before you touch anything else.

From a photo to a page you can print

  1. Drop JPG, PNG or WebP photos onto the box, or press Choose files. Several at once is fine, and duplicates of the same name and size are ignored.
  2. Set Detail for how much texture to smooth away first, and Line threshold for how strong an edge has to be before it becomes a line.
  3. Pick an Output format: Printable PDF (A4), Printable PDF (US Letter), or PNG image (original resolution).
  4. Press Turn a Photo into a Coloring Page. The tracing runs on your own device, so the photo is never uploaded anywhere.
  5. Download each result. The suffix -coloring-page is appended to the original name, so a birthday.jpg comes back as birthday-coloring-page.pdf.

Two colors of equal brightness leave no line at all

This is the limitation worth internalizing before you blame the sliders. The gray conversion uses the standard broadcast weighting, roughly three tenths red, six tenths green, one tenth blue. Pure red maps to 76 on the gray scale. The CSS color green, which is rgb(0, 128, 0), maps to 75. Put one directly against the other and the gradient between them is about one level, nowhere near any usable threshold, so no line is drawn even though the boundary is glaring to your eye.

Nothing on this page can recover an edge that does not exist in brightness. If that is the shape you need traced, push the two areas apart in tone first with the image adjustment tool, or accept that a pencil sketch conversion, which keeps gray tones instead of thresholding to pure black and white, suits that photo better.

The PDF takes its orientation from the photo

The PDF branch hands the traced PNG to pdf-lib, which reads the bitmap’s own pixel dimensions out of the file, then sizes a single page to A4 or US Letter and flips it to landscape when the photo is wider than it is tall. The image is scaled by whichever axis runs out of room first and centered, so aspect ratio is preserved, nothing is cropped, and you get white margins rather than a stretched subject. The PNG option skips all of that and keeps the trace at the photo’s original resolution for editing or printing at a size you choose yourself.

Batches, cancelling, and the one file that stops everything

Files are processed strictly one after another, and there is no per-file error handling anywhere in the chain. A single image the browser refuses to decode takes down the entire run, and you get a generic failure message rather than a list of which file was at fault. Cancelling behaves the same way: the partial results are discarded along with the contents of the dropzone. Neither is a disaster with five holiday photos, but it is worth knowing before you queue up forty.

If you are assembling a whole activity pack, the printable maze generator and the handwriting practice sheets produce PDFs on the same paper sizes, and the rest of the image tools hub covers the cropping and resizing you might want to do to a photo before tracing it.

See it in action

Screenshot of the Turn a Photo into a Coloring Page tool with sysfenix-sample.png (466 KB) loaded, Detail (pre-smoothing, 0-10; 0 keeps every fine line and bit of noise, higher values smooth the photo first for simpler, cleaner outlines) set to 2, Line threshold (5-200; lower traces more and fainter edges as lines, higher keeps only the boldest outlines) set to 40
Turn a Photo into a Coloring Page mid-process: sysfenix-sample.png (466 KB) loaded, Detail (pre-smoothing, 0-10; 0 keeps every fine line and bit of noise, higher values smooth the photo first for simpler, cleaner outlines) set to 2, Line threshold (5-200; lower traces more and fainter edges as lines, higher keeps only the boldest outlines) set to 40.
Screenshot of the Turn a Photo into a Coloring Page result screen showing sysfenix-sample-coloring-page.pdf ready to download (2 KB, 100% smaller)
The finished result: sysfenix-sample-coloring-page.pdf ready to download (2 KB, 100% smaller). The download link is a local blob URL — the file never leaves your device.

Frequently asked questions

What unit is the Line threshold number actually in?

Brightness levels on the familiar 0 to 255 scale. The Sobel kernels are normalized by 4 so that a clean edge between two flat areas produces a gradient magnitude equal to the difference in their gray values, which makes the slider readable rather than abstract. At the default of 40, an edge where brightness jumps by 40 levels or more is drawn as a line and an edge that jumps 39 is left as white paper.

Why did raising Detail make lines disappear rather than just simplify them?

Detail is a Gaussian blur applied before any edge is measured, so it spreads a brightness step across several pixels and lowers the peak gradient at each one. A step that comfortably cleared the threshold as a single hard boundary can end up smeared below it. That is the intended behavior for wiping out camera noise and skin texture, but on a low-contrast photo it can wipe out the subject too, so drop Detail back toward 0 before you decide the photo is unusable.

Two areas in my photo are obviously different colors but got no outline. Why?

The tracer converts the photo to gray first, using the standard weighting that treats green as much brighter than blue, and it only ever looks at that single brightness channel. A saturated red and a medium green can land within a level or two of each other on that scale, so the boundary between them is invisible to the gradient even though your eye sees a hard edge. Adjusting the two sliders will not recover it; nudging the source photo's colors apart in brightness first is the only fix.

What page size and orientation does the PDF come out at?

A4 or US Letter, whichever you selected, with the orientation chosen automatically from the photo, so a landscape picture gets a landscape page. The traced image is then scaled by whichever axis runs out of room first and centered, meaning the whole frame fits on the sheet with white margins and nothing is ever cropped. Pick the PNG option instead if you want the raw traced bitmap at the photo's own pixel dimensions.

I dropped in ten photos and the run failed. Do I get the good ones?

No. The batch is processed one file after another with no per-file error handling, so a single file the browser cannot decode aborts the whole run and nothing becomes downloadable. Cancelling mid-run behaves the same way, since cancel clears the results list along with the dropzone. If one photo is misbehaving, pull it out and re-run the rest.

Does a PNG with a transparent background stay transparent?

The tracer copies the alpha byte of every pixel through untouched, so a transparent region is not converted into white paper the way the opaque pixels are. Every other channel is forced to pure black or pure white, but alpha is simply passed along into the PNG. If you want a guaranteed flat white background, composite the image onto white before you trace it rather than relying on how a given viewer or printer treats the transparency.

Related tools