Edge Detection Tool for Photos
Turn any picture into a clean outline drawing with a real Sobel edge detector that runs entirely on your own device.
Drop images here or click to choose
JPG, PNG, WebP, GIF, BMP and more. Add as many as you like.
Low keeps faint texture. High keeps only the strong outlines.
Multiplies the gradient before the cut-off. Useful on flat, low contrast photos.
Line style
Clean lines gives pure black and white. Soft gradient keeps edge strength as grey.
Finish
Black on white looks like pen on paper and prints better.
People also use
Method
Sobel 3x3 gradient, then non-maximum suppression along the gradient direction
Edge width
One pixel after thinning. On a test step edge, 42 raw pixels became 19
Controls
Sensitivity, contrast boost, hard lines or soft gradient, invert
Files uploaded
None. The picture is decoded and processed in the page itself
Output format
Same as the input. JPG stays JPG, PNG stays PNG, WebP stays WebP
Price
Free, no account, no watermark, no daily limit
How to detect edges in a photo
- 1
Add your pictures
Drop one or more images onto the box above, or click it and pick them from your device. Nothing is sent anywhere; the file is decoded by your own browser.
- 2
Set the sensitivity
Drag the sensitivity slider and watch the live preview. Lower values keep skin texture and fabric, higher values keep only the strong outlines of the subject.
- 3
Apply and save
Press Detect edges to run the filter at full resolution, then save each result. With more than one image ready you get a Save all button that downloads them one after another.
How this compares
| What you get | FlipMyFormat | Photopea | LunaPic |
|---|---|---|---|
| Free without an account | |||
| Images stay on your device | |||
| Sensitivity slider before you commit | |||
| Edges thinned to one pixel | |||
| Several images in one go | |||
| Live preview while you drag | Full editor | ||
| No watermark on the result |
What this tool actually does
Edge detection asks a simple question at every pixel: how fast is brightness changing here, and in which direction. Where a bright object meets a dark background the change is large, so the pixel is marked as an edge. Where a wall is evenly lit the change is nearly zero, so it stays black. The Sobel operator answers that question with two small 3x3 kernels, one measuring the horizontal change and one the vertical change, and the length of that pair is the edge strength.
The direction matters as much as the strength, which is why this tool stores both. Once you know a pixel sits on, say, a vertical edge, you can look at its left and right neighbours and keep it only if it is the strongest of the three. That step is called non-maximum suppression, and it is the difference between a smeared outline and a crisp one pixel line. Getting it wrong is easy: comparing with greater-or-equal on both sides keeps both columns of a tie and gives you two pixel thick lines everywhere. Comparing strictly on one side and loosely on the other breaks the tie and collapses the ridge.
After thinning, a cut-off decides what counts. That is the sensitivity slider. There is no universally right value, because it depends on how contrasty your photo is, so the preview is deliberately live: you drag, you look, you stop when the picture shows the lines you wanted and not the fabric weave of the sofa.
Everything happens on your machine. The image is drawn to a canvas, its pixel buffer is read, the filter runs in plain JavaScript and the result is written back to the same canvas before being exported. Nothing is uploaded, which is worth knowing if you work with product shots that are not public yet, medical images, or anything under a client NDA.
Edge detection pairs well with the rest of the black and white family: run Threshold Image first if your photo is a scanned page, use Grayscale Image when you only want colour removed, or try Photo to Sketch for a softer pencil look instead of hard outlines.
A real gradient, not a sharpen trick
Many online effects fake outlines by subtracting a blurred copy. This one computes the actual Sobel gradient in x and y for every pixel, takes the magnitude, and also keeps the direction so it can thin the result properly.
Why one pixel wide matters
Raw gradient magnitude is fat: a single edge lights up two or three columns. Non-maximum suppression keeps a pixel only where it is the local peak along its own gradient direction. On a plain vertical test edge that cut 42 lit pixels down to 19, and row after row kept exactly one column.
Clean lines or soft gradient
Clean lines applies a hard cut-off so you get pure black and white, which is what you want for laser cutting, colouring pages, vinyl and tracing. Soft gradient keeps the raw strength as grey, which looks better as a texture layer over the original photo.
Where edge detection struggles
Noisy phone photos taken in low light produce speckle, because noise is a gradient too. Very soft focus backgrounds give almost nothing. If your image is a scanned document, a threshold usually beats edge detection, since you want filled letters rather than the outline of each letter.
What people use edge detection for
Turn a photo into a line drawing for tracing
Artists use an edge map as an underlay: run the photo through, print it faintly, and draw over the outlines. Clean lines with a fairly high sensitivity gives you the main shapes without every wrinkle and pore coming along for the ride.
Make a colouring page from a picture
Turn on Black on white, raise the sensitivity until only strong outlines survive, and you get closed-ish shapes on white paper that print well on a home printer. Simple subjects such as animals, cars and buildings work far better than crowd scenes.
Prepare an outline for laser cutting or vinyl
Cutting software needs paths rather than pixels, so the edge map is step one and a trace in a vector tool is step two. A hard black and white result with one pixel lines traces much more cleanly than a grey gradient, which is exactly what Clean lines plus thinning produces.
Check a scanned drawing or plan
Faint pencil lines, blueprint copies and old technical drawings often read better as edges than as tones, because the paper colour stops mattering and only the line survives. Drop the sensitivity if the original is light.
Build an outline layer to blend over a photo
Save the edge map with Soft gradient, then place it over the original in any editor with a multiply or overlay blend. It gives a hand-inked comic look while keeping the photo colours underneath.
Quick visual check in computer vision work
If you are tuning a pipeline and want to see what a Sobel stage is actually producing on your images, this is faster than writing a script. The tool reports what percentage of the picture survives as edge, which is a useful number when you are choosing a threshold.
On your device
Windows
Drag files straight from File Explorer onto the drop box in Chrome, Edge or Firefox. Saved results land in your normal Downloads folder unless your browser is set to ask each time.
Mac
Drag from Finder, or click the box and use the file picker. Safari, Chrome and Firefox all support the canvas features this tool needs, so there is nothing extra to install.
iPhone and iPad
Tap the box, then choose Photo Library or Browse. HEIC photos from the camera are decoded by iOS itself, so they work here without converting first. The saved file goes to Files or Photos depending on your browser setting.
Android
Tap the box and pick from Gallery, Photos or Files. Very large images from a modern phone camera can take a couple of seconds at full resolution, and the preview stays responsive while that happens.
Questions people ask
What is edge detection used for?
Common uses are tracing a photo for illustration, making colouring pages, preparing outlines for laser cutting or vinyl plotting, building a line layer to blend over the original picture, and quick visual checks in computer vision work.
Which algorithm does this use?
The Sobel operator, a pair of 3x3 kernels that measure horizontal and vertical brightness change. The magnitude of that pair is the edge strength and the angle is the edge direction, which is then used for one pixel thinning.
Is this the same as the Canny edge detector?
It shares two of Canny's stages, gradient computation and non-maximum suppression, but it uses a single cut-off instead of Canny's hysteresis with two thresholds, and it does not blur first. In practice the result is very similar on clean photos and slightly noisier on grainy ones.
Why do my edges look speckled?
Noise is a brightness change too, so a grainy or low light photo produces speckle. Raise the sensitivity slider, or lower the contrast boost. Running a light blur on the picture first also helps a lot.
Can I get black lines on a white background?
Yes. Turn on Black on white in the Finish row. That inverts the output, which is the version you want for printing, for colouring pages and for tracing.
Does it work in colour?
The output is deliberately grey or black and white, because an edge map is a strength value rather than a colour. If you want a coloured line drawing, save the edges here and blend the file over your original photo in any editor.
Are my photos uploaded to a server?
No. The image is decoded and filtered inside this page using your browser's canvas, and the finished file is created locally. You can disconnect from the internet after the page loads and the tool still works.
How many images can I do at once?
As many as your device can hold in memory. Settings apply to the whole batch, each file is processed in turn with its own progress, and a Save all button appears once more than one result is ready.
What size images can it handle?
Full camera resolution is fine. A 24 megapixel photo takes a couple of seconds. The live preview is computed on a smaller copy so that dragging a slider stays smooth, and the final save always runs at your original resolution.
Which file format do I get back?
The same one you put in. A JPG comes back as JPG, a PNG as PNG, a WebP as WebP. Anything else, such as BMP or GIF, is saved as PNG, which is lossless and keeps the hard lines sharp.
Is there a watermark or a limit?
No watermark, no sign up, no daily cap. The tool is free and the result is yours to use however you like.
Every pixel is read and written inside this page. Your images are never uploaded, so nothing is stored on a server and nothing is deleted later, because it was never there.
Last updated September 2026 · maintained by the FlipMyFormat team.