A keychain lives a hard life. It is yanked out of pockets, dropped on tiles and pulled on by a bunch of keys whenever it is lifted by the ring. Most failures happen at one place: the join between the keyring loop and the design. This page explains how the Keychain maker builds that join, why it does what it does and how to choose sizes and materials that last.
From your picture to a flat shape
The design is found by thresholding your image. The tool reduces every pixel to its brightness, decides from the border of the image whether the background is light or dark, and uses Otsu's method to pick the grey level that best separates ink from paper. The edges between pixels are traced into closed outlines, scaled to the size you choose and smoothed with the Douglas–Peucker algorithm so that a pixel staircase becomes a straight line. Holes, like the inside of an O, stay holes.
An image with a transparent background is read differently: its opaque pixels are the shape, whatever their colour. That is what makes a photo usable. Brightness would turn a family portrait into blotches of hair and shadow, but the same portrait cut out with the Background Remover has a clean outline, and that outline becomes the keychain. A control lets you go back to brightness when you want the dark areas inside a cut-out instead.
Before the keychain is built, anything thinner than the minimum feature is removed by shrinking the outline by half of it and growing it back. The default is 0.4 mm, one line of a standard nozzle. For a keychain that is a floor, not a target: a 0.4 mm hairline will print, but it will not survive a pocket. If you want a fine detail to last, make the whole keychain wider rather than lowering the minimum.
A photo becomes a relief
The outline of a logo says everything about it. The outline of three people standing together says almost nothing: printed flat it is a blob. So for a photo, or a photo with its background removed, the tool starts in Photo relief instead of Flat silhouette, and you can switch between the two at any time.
The relief comes from a depth estimate, not from the brightness of the picture. Depth Anything V2 Small, a neural network its authors publish under the Apache-2.0 licence, looks at the photo and answers, for every pixel, how near it is compared with the rest. It runs in your browser, on the GPU through WebGPU when there is one and otherwise on the processor through WebAssembly. The model is a 50 MB file fetched from Hugging Face the first time, and only after you press the button that says so; your browser keeps it for the next keychain. The photo itself goes nowhere.
A straight conversion of that depth into height would spend the few millimetres a keychain has on the largest differences, the gap between someone at the front and someone behind, and leave each face almost flat. The tool therefore compresses the depth the way sculptors of low relief do, following the gradient-domain method of Weyrich and colleagues: big jumps in depth are scaled down, gentle slopes are kept, and the result is put back together into one surface. Balanced is the default; Faces takes more from the jumps and gives it to the shape of each person; Linear switches the compression off. The compression only ever shrinks a difference. A point that is nearer than its neighbour in the estimate stays higher than it, and no height is taken from colours, shadows or edges of the photo.
Then the solid is built. The outline of the flat keychain, with its border, its bridges and the ring tab with its hole, becomes a base of the thickness you choose, 1.6 mm by default. The subject stands on it. Its lowest part sits 0.3 mm above the base, one printed layer, just enough for the silhouette to read against the border; its nearest point sits exactly at the maximum relief height, 3.5 mm by default; and everything in between is shape. Three buttons set that height in proportion to the keychain (Subtle, Standard and Bold: 1/30, 3.5/60 and 1/10 of its longest side), and they change nothing else: the whole relief is scaled evenly. People who touch in the photo are one piece, and the person in front would stand on a tall block; so every large jump of depth between one person and the next is cut down to a small step, and the height it took goes to their faces. Tick Keep the real distance between people to leave those jumps as the depth has them. Bring each figure down to the base, at 0% by default, goes further in the same direction: it lowers the outline of each figure towards the base by taking off a share of the smoothest surface that passes through the heights along the outline. It adds no shape, only removes a gentle offset; on our test selfie half of it, which is as far as the control goes, added 0.03 mm to one face and nothing to the others, which is why it starts at 0%. It stops at 50% because beyond that parts of the person behind reach the base and go flat. A raw depth map would waste a third of that height, because nothing in a cut-out is ever at depth zero, so each separate figure is first put on its own floor: the far one in the photo starts from the base like the near one and keeps its own, smaller, relief. From the edge the surface rises over a rounded shoulder 0.6 mm wide rather than as a vertical wall. The border, the bridges and the tab stay flat at base height, and the ring hole goes through everything. The surface is sampled every 0.2 mm, half a standard nozzle, and the outline is traced between samples by marching squares, so it comes out smooth. The summary states the finished size, the base, the tallest point, the total thickness, whether the part is a single piece, and two figures to judge the print by: the relief of the subject and the typical relief inside a 3 mm patch, each in millimetres and in 0.2 mm layers. When that typical relief is under one layer, a warning says the relief is too shallow to print at this size.
Be realistic about faces. On a 60 mm keychain a face is 6 to 17 mm wide, and the model sees a small face as little more than a rounded shape. Measured on a group selfie at 60 mm with the defaults, the nose of the nearest face, 18 mm wide, stands about 1.05 mm above the cheeks, five 0.2 mm layers; on the faces behind it, 10 to 11 mm wide, 0.45 to 0.6 mm, two to three layers. With Bold (6 mm) those figures are 1.9 mm and 0.75 to 1.05 mm, on a keychain 7.6 mm thick. Faces in profile get the shape of the head but hardly any features. Three things help: crop the photo closer to the faces before removing its background, tick Refine faces at higher resolution, which runs the model again on magnified crops (it is on by default; the unrefined relief is shown first and replaced when the crops finish), and raise the maximum relief height. For a larger relief of a single portrait, the route through Image to Depth Map and Depth Map to STL gives you a plaque with every setting exposed.
The border: one keychain, not a handful of letters
A name is not one shape but several, one per letter, plus the dot of every i. Printed as they are, they would fall apart on the bed. The border solves this by growing the outline outward by the border width, 2 mm by default. Two shapes closer together than twice the border width merge into one; a gap wider than that stays open. The counters of letters (the holes in an A, a B or an O) stay holes as long as they are wider than twice the border, and simply get smaller.
That rule tells you how to pick a width. Look at the widest gap you want closed, between two words or between a logo and its tagline, and set the border to a little more than half of it. A wide border also works as a frame, and many keychains look better with a 2 to 3 mm rim of plastic around a delicate design.
Some gaps are too wide for any sensible border: two people standing apart in a photo, a dog beside its owner. For those the tool adds bridges. It finds the closest points between the separate pieces and joins them with straight strips, 3 mm wide unless you change it, using as few as it takes: three pieces get two bridges, along the shortest connections. The 2D preview shows them, and a note says how many were added. Untick the option if you would rather print the pieces loose; the tool then warns that only one of them carries the ring.
Where the keyring goes
The loop is a round tab with a through-hole. Its outer diameter is the hole diameter plus a rim on each side, 1.5 mm by default, so the default 4 mm hole sits in a 7 mm disc. The tool places it straight above the centre of mass of the design, lowering it until the hole comes within 0.8 mm of the drawing. A flat part hung from a point above its centre of mass hangs upright; hung from its tallest point, a raised hand or one ear, it tilts. The clearance keeps a solid band of plastic between the hole and the design, so the ring never cuts into your artwork.
The tool also measures the joint width: how wide the overlap between the tab and the design is at its widest. When the spot above the centre of mass gives a joint under 1.5 mm, as on the tip of a star, it tries 17 positions across the top third of the design and takes the widest joint instead. You can overrule it: drag the ring in the 2D preview, or move the Position slider, where 0° is the top, 90° the right and 180° the bottom. Tick Automatic position to hand the choice back.
Necks and weak joints
Some designs have no good place: a star, a lightning bolt, a heart with a pointed top lobe. When the best joint is narrower than 1.5 mm, the tool adds a neck, a straight bar up to 4 mm wide running from the centre of the loop down into the design, reaching 2 mm below the point where it first meets the drawing. The neck gives the ring something solid to pull on. If the joint is still under 1.5 mm after that, a warning states the width in millimetres. Take it seriously: switch on the border, which gives the loop a fat rim to sit on, or make the keychain larger.
Sizes that work
- Size: most keychains are 40 to 70 mm on their longest side, and the size you enter is that of the finished part. Below about 30 mm, lettering gets hard to read and thin strokes approach the nozzle width. The default is 60 mm; over 100 mm the tool reminds you it no longer fits a pocket.
- Thickness: 3 mm, the default, is stiff enough for PLA; 4 mm feels more substantial. Under 2 mm the part will flex and the loop is the first thing to go, and under 1.2 mm the tool warns you.
- Relief: a 1.6 mm base with 3.5 mm of relief gives a keychain 5.1 mm thick at its tallest point. The ring pulls on the base alone, so keep it at 1.2 mm or more. Print a relief with 0.1 to 0.15 mm layers if your printer allows: the features of a small face are only a few tenths of a millimetre tall.
- Hole: measure the wire of your split ring or clasp and add a little clearance. 4 mm suits most small split rings; a lobster clasp or a lanyard may need 5 or 6 mm.
- Border: 2 mm joins most names; raise it for widely spaced logos.
Materials
PLA is the most widely used filament for FDM printing and shows fine detail well, which makes it the natural first choice. Its weakness is heat: its glass transition is around 60 to 65 °C, and a keychain left on a car dashboard in summer can soften and warp. PETG tolerates more heat and is less brittle, at the cost of slightly softer detail. Whatever you use, print the keychain flat on the bed, as the tool lays it out. The loop then lies in the plane of the layers, where a print is strongest, instead of across them.
For a two-colour keychain on a single-extruder printer, add a colour change a few layers below the top in your slicer, and the upper face prints in a second colour. For a design that stands out in its own colour against a background, use the Plate mode of Image to STL, which exports base and drawing as two coloured bodies in 3MF.
After you download
Slice the keychain with the online STL slicer or your own slicer, confirm the mesh with the STL printability checker if you have edited it elsewhere, and if you are making a batch to sell, the 3D print cost calculator turns the grams and print time into a price. For cookie cutters from the same kind of outline, use the Cookie cutter generator. To see or edit the depth map itself, or to make a relief plaque instead of a keychain, go through Image to Depth Map and Depth Map to STL.