Image Tools

Line Art Extractor

Turn a phone photo of a pencil sketch, a painting or a reference photo into clean line art on a transparent background, ready to ink, color under or trace.

Open a sketch or photoDrop, paste or click · JPG, PNG, WebP

Sample sketch

Try a sample
Method

Adaptive threshold: keeps graphite, drops paper texture and uneven light.

Background
Runs in your browser — your images never leave your device.
Preview embedded tool

Works in an HTML block on WordPress, Wix, Squarespace or a custom website. Change the height if your layout needs more space.

How to use the Line Art Extractor

  1. Open a sketch or photo. Drop the file onto the box, paste a screenshot with Ctrl+V, or click to browse. The two samples — a pencil sketch with a phone shadow and a shaded still life — show each method at its best.
  2. Choose a method. Pencil scan is for graphite or ballpoint on paper. Ink lines draws bold contours from photos, renders and paintings. Edges traces every sharp change in brightness.
  3. Dial it in. Detail decides how fine a stroke counts as a line, Contrast how hard its edges are, Noise removal how big a dot must be to survive, and Line weight thickens everything after the fact. In Ink mode, Solid blacks fills the darkest shadows like a brush pen.
  4. Check before and after. Drag across the image or use the Compare with original slider to see the lines against the source.
  5. Export. Pick a Line color and Background — Transparent to color underneath, White for printing — then Download PNG for a full-size file or Copy image to paste straight into your drawing app.

Why one threshold can’t clean a phone photo of a sketch

The obvious way to pull lines out of a sketch is a threshold: everything darker than some gray becomes black, everything lighter becomes white. It works on a flatbed scan. It falls apart on a photo taken at your desk, because the paper is never one brightness.

Say the paper reads 230 out of 255 by the window and 140 in the shadow of your phone, while a light pencil line reads 170 on the bright side. Set the cut-off at 160 and the shadowed corner turns into a black blob while the faint line vanishes. Move it to 180 and the line comes back, along with half the shadow. No single number wins.

Pencil scan avoids the problem by asking a local question instead: is this pixel darker than its own neighborhood? At the default Detail of 5, each pixel is compared with the average of a window 47 px across on the preview. Paper in shadow is dark, but so is the paper around it, so it stays white; a pencil stroke is darker than the paper right next to it, so it becomes a line. Lower Detail widens the window (75 px at 1) to bridge heavy hatching; higher Detail narrows it (13 px at 10) to catch fine textures.

Ink lines uses the extended difference of Gaussians (XDoG) described by Winnemöller, Kyprianidis and Olsen in 2012. The image is blurred twice, the second blur 1.6 times wider than the first — the ratio Marr and Hildreth recommended as a close stand-in for the Laplacian-of-Gaussian edge detector. Wherever the narrow blur is darker than the wide one, you are on the dark side of an edge, and that strip becomes ink. At Detail 5 the narrow blur has a radius (sigma) of about 1.45 px on the preview.

Edges is the classic Sobel operator: two 3 × 3 kernels weighted 1-2-1 measure how fast brightness changes horizontally and vertically. It finds outlines everywhere, including in flat color art where the other methods see nothing dark to keep.

Which method fits which drawing

What you have Method Settings to try
Pencil sketch, phone photo with shadows Pencil scan Detail 4–6, Noise removal medium
Clean flatbed scan of inks Pencil scan Detail 7–8, Contrast 8–10
Photo of a person or building for tracing Ink lines Detail 3–5, Solid blacks off
Moody photo for a comic panel Ink lines Detail 5, Solid blacks 3–5
Flat digital art or a logo Edges Detail 7, Line weight +1 px
Grainy or heavily textured paper Pencil scan Detail 3, Noise removal strong

Noise removal deletes connected dots smaller than 6, 14, 30, 60, 120 or 240 preview pixels, from light to max. The preview runs on a copy up to 1,100 px on its long side for instant feedback; the download repeats the same math on the full image, up to 4,000 px on the long side, with every radius scaled to match. Everything happens on your own device, so unpublished sketches stay private.

Tips from practice

Shoot flat, not bright. Daylight from a window without the flash gives softer shadows than an overhead lamp. Hold the phone parallel to the page — perspective distortion survives every filter.

Darken faint construction lines with Contrast, not Line weight. Weight thickens everything, including the strokes you meant to keep delicate. Raise Contrast first; add weight only if the whole drawing reads too thin at the final size.

Make the lines a reference layer. In Procreate, open the line layer’s options and turn on Reference; ColorDrop on any other layer then fills up to those lines. Clip Studio Paint has the same idea as Set as reference layer. A transparent PNG makes this a one-step setup.

Pick a line color that matches the finish. A dark brown such as #3B2A20 reads softer than pure black under watercolor-style coloring. To ink by hand over a printout, set the lines to non-photo blue, #A4DDED — the pencil color old reprographic cameras couldn’t see.

Vectorize afterwards if you need to scale. For logos, stickers or cutting machines, run the white-background PNG through the SVG to PNG & PNG to SVG Converter. Want flat color fills instead of lines? Try the Image Posterize Tool.

FAQ

Why do I get a gray blob where the shadow was?

The current method is probably Edges or Ink lines, which read the shadow's border as an edge. Switch to Pencil scan, which compares each pixel only with its neighbors, and lower Detail a step or two so the comparison window is wider than the shadow's soft edge.

Can I color under the lines in Procreate or Photoshop?

Yes. Keep the background on Transparent, download the PNG and import it as its own layer above your color layers. The line pixels keep soft, anti-aliased edges, so set the line layer as a reference layer for fill tools rather than relying on a pure black-and-white threshold.

Does it work on ballpoint, marker or charcoal?

Ballpoint and fineliner behave like crisp pencil and usually need a higher Detail. Marker fills and charcoal smudges are areas rather than lines, so Pencil scan keeps only their outlines; use Ink lines with Solid blacks if you want the filled areas to stay black.

What resolution is the downloaded file?

The same as your original, up to 4,000 pixels on the long side. Larger photos are scaled down to that size first, which is still enough for a letter-size page at 300 pixels per inch on the long edge with room to spare.

Is this the same as tracing the image into vectors?

No. The result is a raster PNG made of pixels. That is ideal for coloring and printing, but if you need paths that scale without blurring, convert the PNG to SVG afterwards in a vectorizing tool.