How to use the photo to sketch converter
- Choose a photo or drop it on the box. JPG, PNG, WebP, GIF, BMP and AVIF files up to 25 MB work. The drawing appears at once, drawn on your device.
- Pick a style: Pencil sketch for gray shading, Color pencil to keep the colors of the photo, or Ink lines to draw only the edges. Choose the largest side the drawing should have.
- Move Shading spread to make the shading finer or bolder, Darkness to darken or lighten the mid-tones, and for ink lines, Line strength. Tick Show the original instead to compare.
- Press Download the drawing to save a PNG or JPG. The original file is never changed.
Formula
Gray = 0.299 x red + 0.587 x green + 0.114 x blue
Shade = min(255, gray x 255 / (255 - blur(255 - gray)))
Darkness: result = 255 x (shade / 255) ^ darkness
Blur is a Gaussian blur made of three box blurs with the edges repeated. Ink lines use the Sobel operator on a lightly blurred gray copy instead of the shading formula.
A flat area, a line and a soft edge
In a flat area of any gray, blurring the inverted picture gives the same inverted value, so the formula divides the gray by itself. The result is 255, which is white paper. That is why plain backgrounds disappear into white in a pencil sketch.
On a thin dark line, the line pixel might be 20 while the blurred negative around it is about 100, because the bright inverted line is spread out. The shade is 20 x 255 / (255 - 100), about 33, so the line stays dark. A light pixel of 200 beside it with the same blurred value would give 200 x 255 / 155, about 329, which is capped at 255, so it turns white. Lines and edges remain, and smooth areas fade.
How the pencil effect works
The photo is first turned to gray. A copy is inverted, so dark becomes light, and blurred. Blending the original with that blurred negative using a color dodge lightens every area that is smooth, and leaves dark strokes wherever the picture changes quickly, such as edges, hair and texture. A larger shading spread blurs more, which makes the strokes bolder and the shading broader.
Color pencil does the same thing on the red, green and blue channels separately, so the drawing keeps a washed-out version of the photo's colors. Darkness raises the result to a power, which darkens mid-tones when it is above 1 and lightens them when it is below 1. It does not change pure black or pure white.
Choosing settings
Photos with clear subjects and plain backgrounds work best. Busy or noisy photos give a scratchy drawing, which a larger shading spread softens. Faces look natural around 1 to 2 percent. For a line drawing, raise the line strength until the outlines you care about appear and the texture stays quiet. If the drawing looks too faint, raise the darkness a little instead of lowering the shading spread.
Large photos are scaled down to the largest side you choose before drawing, which keeps the page fast. For a print, choose 2400 pixels. To trim or border the finished drawing, try the add border to image tool, and to put several drawings on one page, use the photo collage maker.
Privacy and limits
The photo is read and changed in your browser. It is not uploaded. SVG files, PDFs, HEIC photos and other file types are refused by checking the first bytes of the file before anything is decoded. A photo can be up to 25 MB, and very large pictures are refused with a message instead of freezing the page.
Assumptions and limits
- The drawing is a filter applied to the photo, not a hand-made drawing, and results differ a lot between photos.
- Transparent areas are treated as white paper, and the saved file is fully opaque.
- The drawing is made at the chosen largest side, which can be smaller than the original photo.
- The darkness and spread settings are your own choices. No setting is right for every photo.
Frequently asked questions
Why does a plain background turn white?
In a flat area the shading formula divides the gray by itself, which gives pure white. Only areas where the picture changes keep any marks, just as pencil shading appears only where the artist draws.
Can I keep the colors?
Choose Color pencil. It draws on each color channel, so the result keeps a lighter version of the photo's colors.
Why is my drawing smaller than my photo?
Photos are reduced to the largest side you choose, up to 2400 pixels, before drawing. Choose a larger size for a bigger drawing.
Is my photo uploaded?
No. The photo is drawn in your browser tab and the result is saved to your device.