Softness has many ordinary causes. Downscaling an image averages neighbouring pixels together and always costs a little acutance. JPEG compression smooths fine detail. A cheap lens, a slightly missed focus point or a scan from print all arrive soft in different ways.
What an image sharpener cannot do is invent detail that was never recorded. Sharpening exaggerates the differences that already exist at edges, which is a very different operation from reconstruction, and understanding that difference is the whole trick to using it well.
How the sharpening kernel works
The tool passes a three by three convolution kernel over the image. For every pixel it takes the four immediate neighbours, subtracts a fraction of each, and adds the same total back to the centre pixel. The kernel weights sum to one, so flat areas of even colour come out unchanged while any place where neighbouring values differ is pushed further apart.
That is why sharpening is really an edge contrast operation. In the middle of a clear blue sky the neighbours are identical and nothing happens. At the boundary between a dark branch and that sky the dark side gets darker and the light side gets lighter, producing the visual impression of a harder edge.
Alpha is copied straight through rather than convolved, so a transparent PNG keeps clean edges instead of gaining a halo around its cutout.
When an image sharpener helps and when it cannot
Sharpening works on images that are slightly soft but correctly focused. It does not work on motion blur, on an out of focus subject, or on a heavily upscaled thumbnail, because in all three cases the edge information was destroyed or never existed. Applying more sharpening to those images produces noise and halos rather than detail.
The clearest single case for sharpening is after a downscale. Reducing a 4000 pixel wide photograph to 1200 pixels averages pixels together and softens every edge in the frame, and a modest sharpening pass afterwards is standard practice in every publishing workflow.
- Sharpen after resizing an image down for the web.
- Sharpen a flatbed scan of a printed photograph or a page of text.
- Sharpen slightly soft product shots taken with a phone at close range.
- Do not try to fix a blurry photo caused by camera shake or missed focus.
- Do not sharpen an image that is already noisy, since the noise sharpens too.
Choosing a strength value
The strength control scales the kernel. At zero the image passes through untouched. Low values in the range of 0.2 to 0.5 give the gentle lift that suits a downscaled photograph. Values above about 1.0 start to produce visible halos, which are bright or dark outlines that trace strong edges and are the classic sign of an over sharpened picture.
Look at high contrast boundaries when you judge the result, not at texture. Text on a pale background, the horizon line, or a dark railing against a bright sky will show halos long before a patch of grass or fabric does.
Since the operation amplifies differences, it also amplifies compression artifacts. A JPEG that was saved at a low quality setting has blocky edges that this image sharpener will happily make more obvious, so start lower with images that came from an aggressive encoder.
Sharpening compared with an unsharp mask
An unsharp mask works by blurring a copy of the image, subtracting that blurred copy from the original to isolate the edges, and adding the difference back with a controllable amount, radius and threshold. It is the more sophisticated approach because the radius lets you target coarse or fine detail and the threshold lets you protect smooth areas from noise amplification.
A fixed three by three convolution is effectively an unsharp mask with a radius of one pixel and no threshold. For screen sized images that is the right radius anyway, which is why the simpler kernel gives very similar results on web bound work while running far faster in JavaScript.
How this image sharpener works in the browser
There is no native sharpen primitive in the canvas filter property, so the tool reads the pixel array with getImageData, computes the convolution in JavaScript across every channel of every pixel, and writes the result back with putImageData before encoding it.
That is real work rather than a GPU accelerated filter, so a very large photograph takes a moment. The tool processes the image in horizontal bands and reports progress as it goes, which keeps the tab responsive. Nothing is transmitted at any stage, so the size of your file is limited only by the memory available to your browser tab.
| Strength | Visible effect | Suits |
|---|---|---|
| 0.2 | Barely perceptible lift | Already crisp images |
| 0.4 | Clean edge definition | Photos downscaled for the web |
| 0.7 | Strong, texture becomes obvious | Flatbed scans of prints |
| 1.0 | Halos start on high contrast edges | Text and line art only |
| 1.5 | Obvious outlines and noise | Graphic effect, not correction |
How to sharpen an image
- 1
Add your image
Drop a PNG, JPG or WebP file onto the drop area or click to browse. The file is read locally.
- 2
Set the sharpening strength
Start around 0.4 for a downscaled photo. Raise it slowly and stop before outlines appear along high contrast edges.
- 3
Apply the kernel
Press sharpen and watch the progress bar as the convolution runs across the image band by band.
- 4
Check edges and download
Inspect a high contrast boundary in the result, then download at the original pixel dimensions.
Related tools worth bookmarking
Sources and further reading
Frequently asked questions
Common questions about the image sharpener.
No. Sharpening exaggerates edge differences that already exist in the file. When focus was missed those differences were never recorded, so there is nothing to exaggerate and the result is amplified noise rather than recovered detail.
Those are halos, and they mean the strength is too high. The kernel pushes the light side of an edge lighter and the dark side darker, and past a certain point that difference becomes a visible outline rather than an impression of crispness.
After. Downscaling averages neighbouring pixels and softens every edge, so sharpening first means you throw away the work you just did. Resize to the final dimensions, then apply a modest sharpening pass as the last step.
Sensor noise is a pattern of small pixel to pixel differences, and the kernel cannot tell those apart from genuine edges, so it amplifies both. Images shot at high ISO or already compressed heavily should be sharpened much more gently.
No. The convolution runs in JavaScript on the pixel data inside your browser tab, and the encoded result is created locally as a blob. No request carrying your image is made at any point during the process.