Skip to content
3DToolBench

Convert a JPEG into an STL

Drop a photograph in and it becomes a surface: bright parts stand up, dark parts sit low, on a solid base you can print. You set the size and the height in millimetres and watch the model change as you type. The photo is read by your own browser and never sent anywhere.

Drag a 3D file here, or.

This page is set up for JPEG files. Other formats we can read work here too.

The file is read on your own computer. It is never uploaded.

Add a file to switch this on.

Your file is read by your own browser and never sent to a server. There is no upload, no account and no copy of your model anywhere but on your computer.

What a photograph can honestly become

This is the part worth being clear about first, because it is what most people arrive hoping for. A photograph does not contain the shape of the thing in it. It contains how bright each point was. Those are different, and no tool anywhere can turn one into the other from a single picture — the information is simply not in the file.

So what you get is a relief: a surface whose height follows the brightness of the picture. On the right image that is a genuinely good result and looks like the subject. On the wrong one it looks like a melted version of the lighting, because that is what it is.

The images that work are the ones where light and shape already agree. A face lit softly from the front, a pet against a plain background, a silhouette, a signature, a mountain skyline. The images that do not are busy scenes, anything with a bright background behind a dark subject, and anything where a shadow falls across the thing you care about — the shadow becomes a valley cut through it.

Two things a JPEG brings that a PNG does not

The first is its own compression. JPEG saves space by throwing away detail in blocks of eight pixels by eight, and on a smooth area — a sky, a cheek, a wall — that leaves faint square edges. You have never noticed them on screen. In a heightmap they become real steps in real plastic, about a fifth of a millimetre across, and they catch the light.

The smoothing setting is the answer, and one is usually enough. It averages each sample with its neighbours, which removes the block edges and the camera speckle underneath them while leaving every edge you can actually see. Turn it up to two or three for a photograph taken in low light, which is where the speckle is worst.

The second is that a JPEG has no transparency. There is no alpha channel in the format, so there is nothing in the file that says where your subject ends and the background begins. If you want the shape cut out rather than raised, switch the first box to "the shape in it, cut out" and set the darkness threshold by eye — or save the picture as a PNG with a transparent background first, which is exact.

Why there is a base, and what happens without one

The darkest pixel in a photograph is black, and black means a height of zero. A surface built straight from the brightness therefore touches nothing at every dark point, and what you get is not a plaque with dark parts — it is a sheet with holes torn through it wherever the picture was dark.

The base thickness is the flat material underneath that stops it. One millimetre is enough to print and thin enough not to waste plastic; go to two or three if the piece is large enough to flex. The height of the relief is added on top of it, so a base of 1 and a relief of 4 gives a model 5 mm thick at its brightest point.

You can see this working in the measurements under the 3D view. The volume figure only exists for a closed shape, so a number appearing there is the proof that what you are about to download is a solid a slicer will accept rather than a surface it will refuse.

How big, and how much detail

The size box sets the longer side in millimetres and the other side follows the shape of your photo, so nothing is ever stretched. 100 mm is a plaque that fits on most print beds; 60 mm is a fridge magnet.

The detail box is separate, and it is the one that decides the file size. It sets how many samples are taken across the longer side, and every sample becomes geometry — 200 across is around 120 000 triangles, 400 is around 480 000, and the count beside the model tells you exactly where you are.

A big photograph is reduced to that grid before anything is built, and you are told when it happens. This is not a shortcut: a 4000 by 3000 photograph at one triangle per pixel is roughly 48 million triangles, which no browser will hold and no slicer will open. The reduction averages the pixels on the way down rather than dropping them, so detail becomes smoothness instead of becoming noise.

For printing, there is a floor worth knowing. A 0.4 mm nozzle cannot reproduce anything finer than about 0.2 mm, so on a 100 mm plaque a detail setting above about 500 is describing bumps your printer physically cannot make.

STL keeps the shape and nothing else

An STL file is triangles. It has no place to put a colour, a material or an image, so the photograph itself does not travel into the file — only the surface its brightness produced. This is the format, not a limit of this tool, and it is why the result is a relief you can feel rather than a picture you can see.

If you want the picture to stay a picture, STL is the wrong destination. Convert the same file to GLB instead and choose "a flat plane carrying the picture", which keeps every pixel as a texture. That is a different object for a different purpose: one goes to a printer, the other goes into a scene.

What survives, and what does not

Kept in the STL file

  • The brightness of the photograph, as the height of a surface
  • The proportions of the picture, so nothing comes out stretched
  • The size you set in millimetres
  • A closed, watertight solid that a slicer will accept

Lost on the way

  • Colour. An STL file has nowhere to put one.
  • The image itself. Nothing in an STL can hold a picture, so the surface is all that survives.
  • Detail finer than the spacing of the samples, which the detail setting controls.
  • The depth of the real subject, which was never in the photograph to begin with.

How to convert JPEG to STL

  1. Drop the .jpg or .jpeg file in

    It is decoded in your browser and the surface is built straight away, so the model is on screen before you touch a setting.

  2. Choose what to make

    A raised surface is the default and is what a photograph wants. Choose the cut-out instead if your picture is a plain black shape on white.

  3. Set the size and the height

    The size box is the longer side in millimetres. The base is the solid material underneath, and the relief is how far the brightest part stands above it.

  4. Add a little smoothing

    One step removes the block edges JPEG compression leaves behind, which would otherwise print as faint squares across any smooth area.

  5. Check the volume, then download the .stl

    A volume figure under the model means the shape is closed and will slice. Binary STL is the smaller file and every printer reads it.

JPEG and STL compared

JPEG and STL compared, row by row
PropertyJPEG.jpg .jpegSTL.stl
File contentsBinary, compressed by throwing away detail the eye does not notice. Saving again loses a little more each time.Binary or plain text. Binary is an 80-byte header, a triangle count, then 50 bytes per triangle.
GeometryNone. It is a grid of pixels.Triangles only. Curves are approximated when the file is made, and cannot be recovered.
UnitsAn optional density in the JFIF or Exif header, meant for printing on paper.None. The file stores bare numbers, and every reader has to guess what they mean.
Colour and texture8 bits per channel, and no transparency at all.None. There is no place in the format for a colour, a material or a texture.
Separate objectsOne image, usually with camera settings recorded beside it.One body. Several parts written into one STL become one undivided lump of triangles.
Published byThe Joint Photographic Experts Group, 1992. Now ISO 10918.3D Systems, 1987, for the first stereolithography machines.
Written byEvery camera, every phone and every image editor.Every CAD program and every slicer, as the common denominator.

Questions

Can this make a 3D model of the object in my photo?
No, and nothing else can either from a single photograph. The file records how bright each point was, not how far away it was. What you get is a relief whose height follows the brightness, which looks like the subject when the lighting and the shape agree and does not when they do not.
Is JPG different from JPEG here?
No. They are two spellings of one format, left over from when file extensions could only be three letters. Both work on this page and the result is identical.
Why does my photo come out looking like a blurry lump?
Almost always the background. A bright background behind a darker subject comes out taller than the subject, which buries it. Crop tightly, or use a picture where the subject is the brightest thing in the frame.
How thick should it be?
For a plaque, 1 mm of base and 3 to 5 mm of relief. More relief means deeper shadows and a picture that reads from further away, but overhangs get steeper and print worse. Below about 2 mm of relief the image gets hard to see at all.
My file is enormous. What do I change?
The detail setting, which is the only thing that decides the triangle count. Halving it quarters the file. An STL is about fifty bytes a triangle, so the count beside the model tells you the size before you download it.
Is my photo uploaded anywhere?
No. It is decoded and turned into a model inside your browser, on your own computer. There is no upload, no account, and no copy of your photograph anywhere but where it already was.

Having it printed

If the part is larger than your bed, needs a material your printer cannot handle, or you do not have a printer, these will print it and post it to you. Work out what it would cost you first — the cost calculator on this site gives you a figure to compare against.

These are ordinary links, not paid referrals — we earn nothing if you use them. The converter above is the same whether you do or not.

Where to go next