Image to STL
NEW!

Image to STL

Turn a logo, drawing or silhouette into a printable 3D part or a plate with a raised design. Download STL, OBJ or two-colour 3MF. Runs in your browser.

3D Printing

Your image never leaves your browser: tracing, the 3D model and STL/OBJ/3MF export all happen on your own device.

Examples

Starting from a photo? Remove its background first with a background remover: the cut-out's outline becomes the shape. For a relief with depth, use Image to depth map.

Size

This is the size of the finished part, with the border, the keyring or the margin included.

Traces the outline between the pixels instead of along their edges and smooths it: no pixel staircase, no ragged cut-out edge. Corners between two straight sides stay sharp; a finer point is blunted by about that much. 0 traces the exact pixel edge.

Image
128
Border
Loose pieces

When the drawing comes out as several pieces, a straight bridge is added between the closest ones, so it all prints and hangs as one part.

Keyring
0°

Drag the ring in the "Traced outlines" view or move this slider: 0° is the top, 90° the right, 180° the bottom.

Keywords

image to stlpng to stljpg to stllogo to stlconvert image to 3d modelpicture to stl2d image to 3d print

Need something else?

How to use

1

Drop a PNG, JPG or WebP onto the page, or open Examples and pick a star, a heart, a paw print or a name tag. Two-tone artwork works best: a dark logo on a light background, a black silhouette, a stencil.

2

Choose the model type. Silhouette cuts the shape out as a flat part of the thickness you set. Plate puts the drawing on a base: a rectangle, a rounded rectangle, a circle or a plate that follows the drawing's own outline.

3

Set the finished size in millimetres, as a width, a height or the longest side, and for a silhouette the thickness. Leave the threshold on Automatic (Otsu) or untick it and drag the slider; tick Invert if the tool picked the background instead of the drawing. An image with a transparent background needs none of that: its outline is the shape.

4

Check the traced outlines drawn over your image and turn the 3D preview. Warnings tell you when thin parts were removed, when the part falls apart into separate pieces or when screw holes had no room.

5

Download STL, OBJ or 3MF, or press Slice it to open the model in the online STL slicer. The summary shows the size, the triangle count and an estimate of the PLA it will use.

Features

Two ways to print a picture

A silhouette turns the drawing into a solid cut-out, ideal for logos, ornaments, fridge magnets and stencils. A plate stands the drawing on a base with a margin you choose, for signs, door plates, badges and name tags, with optional screw holes.

Automatic threshold that you can override

Otsu's method picks the grey level that best separates drawing from background, straight from the image's histogram. When it guesses wrong, a manual slider from 0 to 255 and an Invert switch put you back in control.

Clean outlines, not staircases

The outline is traced between the pixels, on the soft edge the image itself has, and smoothed by 0.15 mm, so curves and diagonals come out without a pixel staircase. Set the smoothing to 0 and the pixel edges are traced exactly instead, simplified with the Douglas–Peucker algorithm at half a pixel of tolerance.

Printable by design

Details narrower than the minimum feature, 0.4 mm by default, are removed before the model is built, because a 0.4 mm nozzle cannot draw them. A warning says how much area went, so nothing disappears without notice.

Two-colour 3MF for plates

A plate is exported to 3MF as two bodies, the base and the raised drawing, each with its own colour, ready for a multi-material printer or a filament swap. STL and OBJ get one merged, watertight solid.

Why Choose This Tool?

Your artwork stays on your device

Tracing, triangulation and export all run in your browser. A client's logo, an unreleased brand mark or a child's drawing is never uploaded, so there is no account, no queue and no copy left on somebody else's server.

A converter that explains itself

This page describes every step the tool takes, from the threshold to the triangles. When a result surprises you, you can tell why, and which setting to change, instead of guessing at a black box.

Real millimetres and real warnings

You size the part in millimetres, the thin-feature filter is tuned to a 0.4 mm nozzle, and every problem a printer would hit, from loose pieces to parts too thin to print, is reported before you spend filament on it.

From picture to G-code in one tab

Slice it hands the STL to the online slicer on this site; the printability checker and the cost calculator are one click away. You can go from a PNG to a G-code file without installing anything.

How an image becomes an STL: thresholds, outlines and triangles

An STL file describes a closed surface made of triangles. An image is a grid of coloured pixels. Between the two lies a short chain of well-known algorithms, and this page walks through each link exactly as this tool runs it, so you can predict what your picture will turn into and fix it when it does not come out the way you expected.

Step 1: from colour to a yes-or-no mask

First the image is scaled down, if needed, to at most one megapixel. That is plenty for a logo at printing size and keeps the tab responsive on a phone. Every pixel is then reduced to a single brightness value, its luma, using the Rec. 709 weights (0.2126 red, 0.7152 green, 0.0722 blue), which follow how the eye perceives brightness.

The tool also has to know what the background is. It looks at the pixels along the border of the image, uses only the fully opaque ones and takes their median: a light border means a light background, a dark border a dark one. Semi-transparent pixels, such as the soft edge of a PNG logo, are blended over that background before anything else happens, so a half-transparent dark pixel counts as mid-grey rather than solid ink. Fully transparent pixels are always background.

When at least one pixel in a hundred is transparent, the image is treated as a cut-out and the threshold is not used at all: every pixel that is more opaque than transparent belongs to the shape, whatever its colour. A photo whose background was removed therefore gives its silhouette, not a map of its shadows. The Shape from control switches a cut-out back to brightness when the dark areas inside it are what you want.

Then comes the threshold, the single grey level that divides drawing from background. By default the tool uses Otsu's method (Nobuyuki Otsu, 1979), which examines the histogram of grey levels and chooses the split that maximises the variance between the two classes, which is the same as minimising the variance inside each. For a clean two-tone image the answer is obvious and Otsu finds it; for a scan with a greyish background it usually lands in a sensible place. When it does not, untick Automatic and drag the slider, or tick Invert for light artwork on a dark background.

Step 2: cleaning the mask

A thresholded scan is rarely perfect. Specks of fewer than four pixels, the dust of JPEG compression and anti-aliasing, are erased; pinholes of the same size inside the drawing are filled. Where two pixels of the drawing touch only at a corner, the tool fills one neighbouring pixel so they share an edge, because a corner contact would make the final solid non-manifold. A very noisy image, such as a photograph or a halftone print, thresholds into a confetti of tiny shapes; above 100,000 pixel edges the tool refuses it and asks for a simpler picture rather than freeze your browser. For photos, Image to Depth Map and Depth Map to STL are the right route: they turn shades of grey into heights instead of into one outline.

Step 3: tracing and simplifying the outline

The boundary between drawing and background is traced along the pixel grid itself, the lines between pixels rather than through their centres, into closed rings: outer rings counter-clockwise, holes clockwise. The bounding box of the drawing is then scaled so that its width matches the width you asked for, and every ring is simplified with the Douglas–Peucker algorithm (Douglas and Peucker, 1973). It keeps the point farthest from the straight line between two ends, recurses on each half and drops every point that lies within the tolerance, here half a pixel. A traced diagonal edge made of hundreds of tiny steps becomes one straight segment, while real corners survive.

Step 4: removing what a nozzle cannot print

A 0.4 mm nozzle lays down a line around 0.4 to 0.45 mm wide, and a wall thinner than one extrusion is not printable. So the outline is passed through a morphological opening: it is shrunk by half the minimum feature (0.4 mm by default) and grown back by the same amount. Anything narrower than the minimum feature vanishes on the way in and cannot come back; everything wider returns to its original outline. Pieces left smaller than 1 mm² are dropped. If the opening removes 1 mm² or more, you get a warning with the exact area, and you can lower Min feature or make the part wider to keep the detail.

Smooth the outline decides where the edge runs inside each pixel. An anti-aliased drawing has grey pixels along its edge and a cut-out has half-transparent ones: each says how much of the pixel belongs to the shape. With the default of 0.15 mm the outline is the contour of that soft edge, blurred by 0.15 mm, so it passes between the pixels rather than along their sides. A corner where two straight sides meet is then put back where those sides cross: on a square drawn at 0.08 mm per pixel every corner stayed within 0.01 mm of where it was drawn, also with a 2 mm border round it. Curves are left as curves. It still changes the edge in two ways: a point sharper than a right angle is blunted by about that much, and a stroke or a gap narrower than about twice the value can close. Measured on lettering drawn 40 and 60 mm wide from images of 300, 600 and 1200 pixels, every letter and every counter of bold lettering and of a logo survived up to 0.2 mm, and at 0.3 mm the counters of thin 40 mm lettering began to close, which is why the default sits below both. A drawing with no grey in it at all gains less: its staircase only goes once the smoothing reaches about two pixels. Set it to 0 and the pixel edges are traced exactly.

Step 5: triangles and a watertight solid

Each outline, holes included, is cut into triangles by ear clipping as David Eberly describes it: a polygon always has an "ear", a corner whose triangle lies entirely inside the shape, so ears are clipped one at a time until nothing is left. Holes are first joined to the outer ring by a bridge from each hole's rightmost vertex to a vertex of the outline it can see, which turns a shape with holes into one polygon that ear clipping can handle. The triangles are used for the top face, reversed for the bottom face, and joined by vertical walls along every ring. Because the caps and walls share exactly the same points, every edge belongs to exactly two triangles: the solid is watertight and manifold, which is what the STL printability checker tests for and what every slicer expects.

Silhouette or plate?

A silhouette is the shape itself, extruded to a uniform thickness: a logo you can hold, a cake topper, a stencil, a fridge magnet. It has one weakness. If the drawing is made of separate parts, the letters of a word or the pads of a paw print, they print as separate pieces, and the tool warns you. Tick Border to grow the outline by a few millimetres, which closes gaps narrower than twice the border width, or Join separate pieces with bridges to connect whatever is still apart with straight strips between the closest points.

A plate stands the drawing on a base. Choose a rectangle, a rounded rectangle (3 mm corners by default), a circle or outline, which follows the drawing grown by the margin. The default base is 2 mm and the raised drawing 1.2 mm on top of it. Separate parts are no problem here, because the base holds them all. Tick Screw holes and two holes are placed on the plate's horizontal centre line, half a margin in from the left and right edges; if they would come closer than 0.5 mm to the drawing, they are left out with a warning rather than cut into your design.

The plate is also where 3MF earns its place. STL files carry only surface geometry, with no colour, so the STL and OBJ downloads contain one merged solid. The 3MF core specification allows several objects in one file, each with a base material and a display colour, so the 3MF download keeps the base and the relief as two bodies in two colours. Load it into a multi-material printer and assign a filament to each, or print it on a single-extruder machine with a colour change at the layer where the drawing begins, the feature PrusaSlicer inserts as an M600 filament change.

Size, detail and filament

The size you set is the size of the finished part, measured on its width, its height or its longest side, whichever you choose. A border, a keyring tab or the margin of a plate are inside that figure: the drawing is scaled down to leave room for them. The summary gives the final size, the triangle count and an estimate of the filament: the volume of the solid multiplied by the density of PLA, 1.24 g/cm³, the same value the slicer's PLA profile uses. For a proper price including electricity and machine time, take the grams to the 3D print cost calculator, or slice the model and read the time and weight from the online STL slicer.

Related tools on this site

Two presets of this same engine have their own pages. The Keychain maker adds a keyring tab with a real through-hole and a border that holds everything together. The Cookie cutter generator turns the outline into a thin cutting wall with a stiffening flange. Both explain the geometry specific to their job.

When not to use it

This tool makes 2.5D parts: every point of the drawing has the same height. It cannot read shading as depth, so a portrait photo will not become a face. Use the depth-map tools for that. It does not import vector files; export your SVG or PDF logo to a PNG first. And it is not a CAD program: for parts that must fit other parts to a tenth of a millimetre, model them properly and use this tool for the decorative pieces.

Frequently Asked Questions

Is my image uploaded?

No. The image is decoded in your browser, traced and meshed in a background worker on your device, and the STL, OBJ or 3MF file is generated there. Nothing is sent to a server.

Which images work best?

High-contrast, two-tone artwork: a dark logo on a white background, a black silhouette, a scanned stencil. A PNG with a transparent background is ideal: its outline is taken as the shape. A photo that still has its background does not threshold into a clean outline; remove the background first, or use Image to Depth Map and Depth Map to STL for a relief.

Why did part of my drawing disappear?

Either the threshold put it on the background side, or it was narrower than Min feature (0.4 mm by default) and was removed because a standard nozzle cannot print it. The warnings say which. Move the threshold, lower Min feature or make the part wider.

Why does my model print as several loose pieces?

The drawing is made of separate shapes, such as letters or the pads of a paw. On a silhouette, tick Border to merge shapes that are close together and Join separate pieces with bridges to connect the rest, or switch to Plate, where a base holds every piece.

What is the difference between the STL and the 3MF?

STL and OBJ contain one merged solid with no colour information. The 3MF records millimetres explicitly and, for a plate, keeps the base and the raised drawing as two bodies in two colours, ready for multi-material printing or a filament change.

Is the STL watertight?

Yes. The top, bottom and walls are built from exactly the same outline points, so every edge is shared by exactly two triangles. You can verify it with the STL printability checker on this site.

How thick should the part be?

Around 2 to 4 mm suits most flat parts; the default is 3 mm. The tool accepts down to 0.4 mm, two 0.2 mm layers, which is too flimsy for anything but a thin stencil.

Can I use an SVG file?

Not directly. The tool reads raster images: PNG, JPG, WebP and whatever else your browser can decode. Export the SVG to a PNG at a generous size, a thousand pixels across or more, and drop that in.

How accurate is the weight estimate?

It is the exact volume of the solid multiplied by the density of PLA, 1.24 g/cm³. A real print weighs less because the slicer fills the inside with sparse infill; slice the model to get the figure your printer will actually use.

Learn more