Photo to Cartoon
Turn a photo into a cartoon, privately, in your browser.
Turn a photo into a cartoon, without uploading it
Drop in a photo and it comes back as a cartoon: flat areas of colour, bold outlines, no photographic texture. Drag the divider across the picture to compare it with the original. Everything happens on your device — the photo is never sent to a server, which is the point for pictures of your children, your home or your face.
How the effect works
A photograph looks like a photograph because of three things: fine texture everywhere, smooth gradients of colour, and edges defined by changes in tone rather than by lines. The filter removes each one in turn.
- Smoothing. An edge-preserving (bilateral) blur averages each pixel with its neighbours, but only with neighbours of a similar colour. Skin, sky and walls go flat; the boundary between a face and the background stays sharp. More smoothing gives a softer, more painted look.
- Colours. The image is then reduced to a small palette chosen from the photo itself, using k-means clustering. Gradients become bands — the cel-shaded look of hand-coloured animation. Fewer colours is bolder and more graphic; more keeps more of the photo.
- Outlines. Finally a difference-of-Gaussians edge detector finds the outlines a cartoonist would draw — the contour of a face, the line of a jaw, the edge of a sleeve — and inks them in. Raising the setting draws more and darker lines.
The four styles are starting points for those three settings. Cartoon is balanced. Comic uses six colours and heavy ink, like a printed comic. Poster drops the lines for a flat screen-print look. Sketch keeps only the lines, on white.
Getting a good result
- Start with a clear subject. One person or object against a simple background cartoons far better than a busy street. Clutter turns into clutter with outlines.
- Good light helps. The outline detector follows changes in brightness, so a well-lit face with clear shadows gets clean contours; a dim, flat photo gets few lines.
- Portraits: fewer colours, more smoothing. Try 6–8 colours and smoothing 3 to keep skin in one or two tones instead of blotches.
- Size changes the look. Line thickness scales with the picture, but at 800 px everything is chunkier and bolder; at 3000 px the result is finer and takes a few seconds.
Frequently asked questions
Is my photo uploaded anywhere?
No. The image is decoded and filtered by JavaScript inside your browser, and the result is saved straight from the page. Nothing is transmitted or stored, and the page keeps working if you disconnect from the network after it loads.
Is this AI?
No — it is classic image processing: a bilateral filter, colour quantisation and edge detection, the techniques behind the cartoon effects in photo apps long before generative AI. That makes it fast, predictable and private, and it means the result is always your photo, restyled: it will not invent features or change a face. It also means it will not redraw your photo in the style of a particular animation studio; that needs a generative model running on a server.
Why does the result look different at different sizes?
Smoothing and colour work pixel by pixel, so a smaller image has proportionally larger flat areas. Outlines are scaled to the picture to compensate, but the overall feel is bolder at small sizes. Pick the size you will actually use the image at.
Can I use the result commercially?
The filter adds nothing of its own, so the output belongs to whoever owns the original photo. If it is your photo, the cartoon is yours to use however you like.
Does it work on a phone?
Yes. Phones are slower than laptops, so start at 800 or 1200 px. HEIC photos from an iPhone open in Safari; in other browsers, share the photo as JPEG first.