---
title: "Height Map to STL"
description: "Convert grayscale height maps and terrain images into 3D-printable STL. All processing stays local in your browser. No upload, your data stays private."
toolId: "heightmap-to-stl"
category: "conversion"
subgroup: "image-to-3d"
subgroupName: "Image to 3D Model"
url: "https://any3d.cc/en-US/tools/heightmap-to-stl"
markdown: "https://any3d.cc/llm/tools/heightmap-to-stl.md"
---

# Height Map to STL

Turn grayscale height maps and terrain images into 3D-printable STL models with live preview.

**Category:** 3D Format Conversion Tools (`conversion`)
**Subgroup:** Image to 3D Model (`image-to-3d`)

**HTML:** https://any3d.cc/en-US/tools/heightmap-to-stl

> Runs entirely in the browser. Files are not uploaded to Any3D servers.

## Overview

Upload a PNG, JPG, or WebP height map. Brighter pixels are higher. You can adjust max height, base thickness, smoothing, and sample resolution, then download the STL for printing or further editing.

## Tips

- Prefer high-contrast grayscale images
- Increase base thickness for better print stability
- Higher resolution captures more detail but results in larger files

## How to Use

1. **Upload a height map:** Drop a grayscale or color image
2. **Adjust terrain settings:** Set height scale, base and resolution
3. **Download STL:** Export a printable mesh

## About Configuration Options

### Terrain settings

- **Invert height** (Default: off): When enabled, dark pixels become high and light pixels become low.
- **Max height** (Default: 5mm; Range: 0.5mm – 20mm · step 0.1mm): Maximum height of the tallest terrain peak in mm.
- **Base thickness** (Default: 1mm; Range: 0mm – 5mm · step 0.1mm): Thickness of the solid base below the terrain.
- **Smoothing** (Default: 2; Range: 0 – 10): Applies smoothing to reduce noise in the terrain mesh.
- **Resolution** (Default: 400px; Range: 100px – 400px · step 50px): Number of grid subdivisions. Higher = more detail, larger file.

## Format Information

### Input format

- **Extension:** Image
- **Full Name:** Image File
- **Type:** Image
- **Format:** PNG / JPG / JPEG / SVG / WebP
- **Tools:** [Photoshop](https://www.adobe.com/products/photoshop.html), [GIMP](https://www.gimp.org), [Krita](https://krita.org), [Paint.NET](https://paint.net/), [Inkscape](https://inkscape.org), [Adobe Illustrator](https://www.adobe.com/products/illustrator.html), [Figma](https://www.figma.com), [Affinity Designer](https://www.affinity.studio/graphic-design-software)
- **Open With:** Image Editor, Windows Photos, Preview (Mac), Vector Editor, Web Browser, [Inkscape](https://inkscape.org)
- **Description:** Any supported image format including PNG, JPG, JPEG, SVG, and WebP. The tool automatically detects the format and applies the appropriate conversion settings.
- **Supported Features:**
  - Supports PNG, JPG, JPEG, SVG, and WebP formats
  - Automatic format detection
  - Transparency support for PNG and WebP

### Output format

- **Extension:** stl
- **Full Name:** Stereolithography
- **Type:** 3D Mesh
- **Format:** STL (Binary / ASCII)
- **Tools:** [Cura](https://ultimaker.com/software/ultimaker-cura/), [PrusaSlicer](https://www.prusa3d.com/p/prusaslicer/), [Chitubox](https://www.chitubox.com), [Simplify3D](https://www.simplify3d.com)
- **Open With:** Slicer Software, [MeshLab](https://www.meshlab.net), Windows 3D Viewer, [STL Viewer Online](https://any3d.cc/en-US/tools/stl-viewer)
- **Description:** STL is the de facto standard mesh format in 3D printing, storing only triangular surface data since 1987, without color, texture, or material. Almost all slicers (Cura, PrusaSlicer, Bambu Studio, ChiTuBox) and printers directly support STL, ensuring its enduring popularity.

Two classic pitfalls: STL lacks unit definitions, making millimeters and inches indistinguishable on disk; always verify scale in your slicer. It also has ASCII (readable but 4-6x larger) and binary (compact, default) encodings. For multi-color printing, materials, or parameters, switch to 3MF, which carries richer print information while maintaining slicer compatibility.
- **Supported Features:**
  - Triangle mesh only, simple and universally compatible
  - Binary and ASCII encoding options
  - Directly importable into Cura, PrusaSlicer, Chitubox, etc.
- **Notes:**
  - Does not support colors, textures or materials
  - No unit definition; verify scale in your slicer
  - ASCII format is 4-6× larger than binary

## Examples

- Original
- Heightmap
- Inverted Heightmap

## FAQ

### What type of image works best?

Grayscale elevation maps or high-contrast photos. White is high, black is low (can be inverted).

### Can I use real terrain data?

You can export a grayscale DEM or screenshot from a mapping tool and upload it. This version does not directly fetch map elevation data.

### How do I invert the height?

Check the 'Invert height' box in the parameters panel. Dark pixels become high, light pixels become low.

### What unit is the output STL in?

The default unit is millimeters (mm). You can adjust the max height and base thickness before exporting to control the overall size.

### How do the model's width and depth relate to the image and the height settings?

The footprint is 100 mm along the longest side, with the other side scaled by your image's aspect ratio. The height ranges from the base thickness to base thickness plus max height, so raising max height makes the relief steeper relative to the width.

### When should I increase the smoothing value?

Use smoothing when your image contains noise (scanned photos, JPEG artifacts or irregular elevation data) that would otherwise show up as spiky, rough surfaces. Higher values blur those high-frequency bumps into cleaner slopes. For a clean, high-quality heightmap, keep it low or at 0 to preserve detail.

### Is Any3D completely free?

Yes, Any3D's core features are free to use forever. We provide format conversion, model optimization, and online preview at no cost, with no registration required.

### Are my files uploaded to your servers?

No. Files you select are processed only in your browser on this device, so they never leave your device and are never sent to our servers. We don't store any user files; after processing, related data in browser memory is released.

### Do I need to install software?

No installation required. Any3D is entirely browser-based; just open the webpage to use all features. It works on Windows, Mac, Linux, and other major operating systems.

### Is there a file size limit?

There is no cap on file size or polygon count. How large a model you can open depends on your device's memory and graphics card, and very heavy models may make the page lag or crash. Some tools do limit how many files go in at once, such as {maxBatchModels} models per batch or single images up to {maxImageSizeMb} MB in texture compression. See [Limits](/help/limits) for the full list.
