gizmobench

Image to Sketch

Choose a PNG, JPEG, WebP, GIF or BMP photo up to 16.7 megapixels and it becomes a sketch through a fixed filter you can see and adjust: gray scale, invert, a blur of the radius you set, a color dodge that turns soft changes into pencil tones, and Sobel edges laid over the top wherever the edge score, the size of a straight brightness step, reaches your threshold. Pencil, Edges and Pencil + edges modes, contrast and edge weight set how dark the strokes are, and one sample pixel's working is shown beside the photo, step by step, so every number can be checked. Compare the result with the photo in a before, after or split view, then save a PNG that keeps the photo's transparency or a JPEG on white, both at the photo's own pixel size. It is a pixel filter, not generative drawing, and the photo is sketched in your browser and never uploaded.

Turn a photo into a pencil or edge sketch

PNG, JPEG, WebP, GIF or BMP up to 16.7 megapixels. It is sketched in this browser and never uploaded.

Size out
no photo yet
Blur radius
8 px
Edge threshold
30 of 255
Sample pixel
none yet

  • A uniform gray 128 imageany blur, any threshold
    every pixel comes out 255, paper white, and no edge is drawn
  • Straight steps of 20 and 60 gray levelsedge threshold raised from 10 to 40
    the 20-level edge disappears and the 60-level edge stays
  • A transparent 30 x 20 px PNGsaved as PNG, then as JPEG
    the PNG is 30 x 20 px with the same alpha on every pixel; the JPEG is 30 x 20 px with transparent areas on white

Common questions

How do I turn a photo into a pencil sketch?
Choose a photo or drop it on the stage, keep Pencil + edges or pick Pencil, and set the blur radius: a larger radius spreads the shading further from each edge. Contrast darkens the pencil tones and edge weight sets how dark the outlines are. The preview updates a moment after each change, and PNG or JPEG saves the sketch on screen.
Does it use AI to draw the sketch?
No. It is a fixed pixel filter: gray scale, invert, blur, color dodge and Sobel edges, worked in whole numbers. It turns changes in brightness into tones and lines, and it cannot add strokes, hatching or detail that the photo does not have.
Why are parts of my sketch blank white?
Flat areas come out paper white by design: where the photo is evenly toned, a pixel's gray matches its blurred surroundings and the color dodge gives exactly 255, and smooth gradients come out close to white. Raise the contrast to darken the pencil tones, raise the blur radius to widen the shading, or lower the edge threshold so weaker edges are drawn.
What do the blur radius and edge threshold numbers mean?
The blur radius is in the photo's own pixels: the inverted gray is averaged over 2r + 1 pixels across and then down, three times, which approximates a Gaussian blur. The threshold is on the 0 to 255 gray scale: a straight step of d gray levels scores d, so at 30 a step of 30 levels or more is drawn and weaker ones are dropped.
Does the saved sketch keep the photo's size and transparency?
Yes. The PNG and the JPEG are both the photo's own width and height in pixels. The PNG keeps the photo's alpha channel, so a cut-out stays cut out; a JPEG has no transparency, so transparent areas are laid on white, and it is saved at quality 0.92.
Will the same photo always give the same sketch?
Yes, for the same pixels and settings: every step is whole-number arithmetic, so the result is identical pixel for pixel whether it ran in the background worker or on the page. Two different browsers can decode the same JPEG very slightly differently, and a changed input pixel can change the sketch around it.
How large a photo can it sketch?
Photos up to 16,777,216 pixels (16.7 megapixels, such as 4096 x 4096) and 16384 pixels on a side open, which covers a 12 megapixel phone photo at 4032 x 3024 and a 16 megapixel camera photo at 4608 x 3456; a 24 megapixel photo at 6000 x 4000 needs saving smaller first. The size is read from the file's header before it is decoded, because the photo and its sketch, both at full size, have to fit in the tab's memory on a phone as well as a computer. HEIC and AVIF files need saving as JPEG or PNG first, and a GIF gives its first frame.
Is my photo uploaded anywhere?
No. The photo is decoded and sketched in your browser, in a background worker where the browser allows one, and nothing is sent anywhere. Only the settings are remembered in this browser (mode, gray scale, sliders and view), never the photo or the sketch.

A fixed pixel filter, not generative drawing, built from gray scale, an inverted blur, a color dodge and Sobel edges: in one browser the same picture and settings give the same sketch every time. It turns changes in brightness into pencil tones and lines and cannot draw, generate or recover detail the photo does not hold, so flat areas come out paper white. The saved file keeps the photo's pixel size; a PNG keeps its transparency and a JPEG puts it on white.