Table of Contents >> Show >> Hide
- What Is an HGT File?
- Where HGT Files Come From
- What’s Inside an HGT File? (The “Under the Hood” Tour)
- How to Open an HGT File
- How to Convert an HGT File (So Everything Else Behaves)
- Common Problems Opening HGT Files (And How to Fix Them)
- What Can You Do With an HGT File? Practical Use Cases
- Are HGT Files Safe?
- FAQ: Quick Answers About HGT Files
- Experiences With HGT Files: Real-World Scenarios and “Lessons Learned”
- Conclusion
You found a file ending in .HGT, and your computer reacted like you handed it a mysterious brick labeled
“DO NOT OPEN.” Fair. An HGT file is basically a compact chunk of elevation datathink “the Earth’s height map,” cut into
tidy squares. Once you know what it is, opening it is less “hacking NASA” and more “click the right GIS button and pretend
you meant to do that.”
In this guide, you’ll learn what an HGT file is, why it exists, what’s inside it, where it usually comes from, and the most
practical ways to open, view, and convert it on Windows, macOS, and Linux (plus a few mobile-friendly options).
What Is an HGT File?
An HGT file is a “raw” elevation grid commonly associated with the
Shuttle Radar Topography Mission (SRTM), a NASA-led mission that produced a near-global digital elevation
model (DEM). Each HGT file typically represents a 1° by 1° tile of Earth’s surface, storing elevation
values on a regular latitude/longitude grid.
If you’ve ever used hillshade maps, elevation profiles, line-of-sight planning, watershed models, or 3D terrain in mapping
software, you’ve already benefited from DEMs like SRTM. HGT is one of the classic ways that SRTM elevation tiles were shared.
It’s simple, efficient, and a little “old school”like a cassette tape that still sounds great if you have the right player.
What “HGT” Stands For (Spoiler: It’s Not a Fancy File Type)
The .hgt extension is shorthand for height. It’s not a complex container format with a big
header and metadata; it’s essentially a grid of elevation numbers written one after another. Translation: software needs to
recognize the convention (tile naming, resolution, and “no data” value) to interpret it correctly.
Where HGT Files Come From
Most HGT files you’ll run into are derived from SRTM products distributed through U.S. government and research channels and
partner archives. SRTM coverage includes most land between about 60°N and 56°S. For many users, the download
path starts with tools like USGS EarthExplorer or NASA’s Earth data portals, depending on the product and
processing level.
You’ll also see HGT tiles bundled with apps that do offline elevation (navigation tools, hiking apps, 3D terrain viewers),
or inside GIS workflows that still love “raw but reliable” rasters.
What’s Inside an HGT File? (The “Under the Hood” Tour)
HGT files store elevation as 16-bit signed integers measured in meters, arranged in rows and
columns in a geographic (latitude/longitude) grid. Because it’s “raw,” there are no embedded labels telling your computer
what’s whatthe file name and known conventions do the heavy lifting.
Tile Naming: N37W122.hgt and Friends
HGT tile names usually look like N34W119.hgt. The letters and numbers indicate the
southwest corner of the 1° tile: N/S for latitude, E/W for longitude. For example, N34W119 covers latitude
34–35°N and longitude 119–118°W (yes, the ordering can feel backwards until you remember longitudes “count” westward).
Resolution: 1201×1201 vs 3601×3601
Common SRTM-related HGT grids include:
- 3 arc-second (~90 m): typically 1201 × 1201 samples per tile.
- 1 arc-second (~30 m): typically 3601 × 3601 samples per tile.
That “+1” (1201 instead of 1200, 3601 instead of 3600) is not a typo; it’s tied to how tiles include overlapping edges so
adjacent tiles align cleanly.
NoData / Voids: The Infamous -32768
If elevation is missing, many HGT tiles mark it with -32768. In a viewer, those can appear as dramatic
trenches or “bottomless pits” until you set the NoData value properly or use a void-filled product.
Projection and Datums (Why It Lands in the Right Place)
SRTM elevation data are typically in a geographic coordinate system (latitude/longitude), commonly referenced
to WGS84, with elevation units in meters. Depending on the distribution, vertical reference details can also
matter for precise analysis (especially if you’re comparing against local survey data).
Some newer or “versioned” SRTM products include void-filling and improvements using other elevation sources, which can change
how clean the terrain looksespecially in mountainous or radar-challenging regions.
How to Open an HGT File
The easiest way to open an HGT file is with a GIS or terrain tool that recognizes SRTM/HGT conventions. Below are reliable
options used by professionals, students, and anyone who has ever said, “I just need the elevation, not a new personality.”
Option 1: Open HGT in QGIS (Free, Powerful)
QGIS is a popular free GIS app that can read SRTM/HGT through GDAL support. Typical workflow:
- Open QGIS.
- Go to Layer → Add Layer → Add Raster Layer.
- Select your
.hgtfile and load it. - If it looks like a weird rectangle of sadness, set NoData to
-32768and apply a hillshade or color ramp.
Troubleshooting tip: if QGIS complains it can’t open the dataset, the file name may not match expected tile naming, or the
file may be an unexpected variant (older/nonstandard SRTM packaging). Renaming to the standard pattern sometimes fixes
recognition because some drivers rely on naming conventions.
Option 2: Open HGT in ArcGIS (ArcGIS Pro / ArcMap)
If you’re in the Esri ecosystem, both ArcGIS Pro and ArcMap list HGT as a supported raster
format for displaying SRTM tiles. Typical workflow:
- Create or open a map.
- Use Add Data and browse to the
.hgtfile. - Symbolize it as an elevation raster (color ramp, hillshade, contours, etc.).
If a tile doesn’t draw correctly, export it to GeoTIFF first (see the conversion section). GeoTIFF tends to be the “universal
adapter” for raster workflows, especially when sharing with teammates or software that’s picky about raw formats.
Option 3: Open or Export HGT with Global Mapper
Global Mapper is widely used for terrain and geospatial processing. It includes tools specifically designed
to export elevation data to SRTM HGT specifications, including naming, projection, and standard sample size
which is great when you’re converting a DEM into an HGT tile set for compatibility with other software.
Option 4: Use GDAL (Command Line or Libraries)
GDAL can read SRTM/HGT tiles via its SRTMHGT driver, and it can even read some zipped HGT packages when named
appropriately. If you’re comfortable with the command line, this is one of the most flexible routes.
- Inspect metadata:
gdalinfo N34W119.hgt - Convert to GeoTIFF:
gdal_translate -of GTiff N34W119.hgt N34W119.tif - Build a mosaic: use a VRT, then translate to a final raster
This approach is ideal for batch work: converting dozens of tiles, standardizing NoData, reprojecting, or clipping to an area
of interest.
Option 5: MATLAB (If You’re Doing Analysis or Prototyping)
If you’re in MATLAB for modeling or research, there are community tools designed to read NASA SRTM HGT tiles and return a grid
of elevations with latitude/longitude vectors. It’s a clean way to turn a “raw” file into something you can plot, filter, and
analyze without building a parser from scratch.
Option 6: ENVI and Remote Sensing Workflows
Some remote sensing workflows open SRTM DEMs directly as external elevation files, making it easier to do terrain correction,
visualization, or preprocessing alongside imagery.
How to Convert an HGT File (So Everything Else Behaves)
HGT is compact, but it’s not always the easiest format for long-term projects. Converting can save you time and prevent
“Why is this raster upside down?” moments.
Best Conversion Targets
- GeoTIFF: best for GIS compatibility and sharing
- Cloud-optimized GeoTIFF: better for web and cloud workflows
- GeoPackage: handy if you want rasters and vectors in one container
- ASCII Grid: human-readable (also human-baffling at large sizes)
Common Conversion Example with GDAL
Let’s say you have N34W119.hgt and want a GeoTIFF:
Then you can reproject (example into Web Mercator for many web maps):
If you need a seamless area, build a virtual mosaic (VRT) from multiple tiles, then translate it to a single raster file.
That keeps processing fast and reduces duplication until you’re ready to export.
Common Problems Opening HGT Files (And How to Fix Them)
1) “Cannot open dataset” Errors
- Check the file name: many tools expect the standard tile naming pattern (N/S + latitude + E/W + longitude).
- Confirm the file is truly HGT: some downloads bundle a different DEM format with a similar label.
- Try converting with GDAL: if GDAL can read it, export to GeoTIFF and use the TIFF everywhere else.
2) The Map Loads, But Looks Like a Flat Pancake
That’s usually a symbology issue. Apply a color ramp, compute hillshade, or generate contours. Elevation rasters often look
“blank” until styledbecause grayscale “slightly different grays” is not a strong visual personality.
3) Weird Spikes, Giant Holes, or “Abyss Mode”
Set the NoData value to -32768 and consider a void-filled SRTM product if your workflow needs complete coverage.
Some SRTM versions include void-filling from other elevation datasets, which can reduce missing-data artifacts.
4) Your Tile Isn’t Available Where You Expect
Some areas (especially outside the SRTM latitude band) aren’t covered in the original mission products. Also, certain latitudes
may have different sampling rules in some distributions, so check dataset notes if you’re working near the edges of coverage.
What Can You Do With an HGT File? Practical Use Cases
- 3D terrain visualization for planning, presentations, or “look at that mountain!” moments
- Contours for cartographic maps or engineering context
- Slope/aspect analysis for construction, agriculture, habitat modeling, or hazard mapping
- Viewshed / line-of-sight for radio towers, scenic overlooks, and “Can I see the ocean from here?”
- Hydrology such as watersheds, flow accumulation, and flood modeling (with appropriate preprocessing)
Are HGT Files Safe?
HGT files are data filesnot programsso they generally don’t “run” anything by themselves. The main risk is downloading from
shady sources or bundling tools you don’t trust. Stick to reputable distributors and scan unknown downloads, just like you
would with any file you didn’t personally create.
FAQ: Quick Answers About HGT Files
Can I open an HGT file in Excel?
Not in a meaningful way. An HGT file is binary elevation values, so Excel will show gibberish. Convert it to a text-based
grid if you really need a spreadsheet-friendly format, but be prepared for extremely large files and extremely small joy.
Is an HGT file the same as a DEM?
HGT is one way to store a DEM (a digital elevation model). “DEM” is the concept; “HGT” is a specific file convention commonly
used for SRTM tiles.
Why do some tools require the exact file name?
Because the file is “raw.” The tile name tells software where the data belongs on Earth and what it represents. If the name
doesn’t follow the convention, some software can’t auto-locate the tile without extra hints.
Experiences With HGT Files: Real-World Scenarios and “Lessons Learned”
Most people meet HGT files the same way they meet a flat tire: unexpectedly, usually right before a deadline, and with a brief
moment of denial. One common “first experience” is downloading a tile for a projectmaybe you’re building a trail map, planning
a radio link, or trying to generate contours for a reportand the file opens as… nothing. Just a blank rectangle. That’s when
you learn the first HGT truth: elevation data needs styling. The file isn’t broken; it’s simply refusing to perform without
proper lighting and a flattering color ramp.
Another classic experience is the NoData Abyss. You load the raster, zoom in, and discover what appears to be a canyon
so deep it might have its own weather system. In many cases, that’s not a new geological wonderit’s the NoData value (often
-32768) being treated as a real elevation. Once you set NoData correctly or switch to a void-filled dataset, the “canyon”
disappears, and your terrain returns to being Earth instead of a sci-fi movie set.
People also run into naming conventions in a very personal way. If a tile is named incorrectlymaybe you unzipped something and
ended up with a filename like output_final_final2.hgtsome software stares at it like it’s a prank. Renaming it to
something like N34W119.hgt can instantly make it recognizable. It feels ridiculous the first time it works (“I fixed
it by… renaming it?”), but it makes sense: raw formats often depend on external conventions to know where the data belongs.
In longer projects, teams often convert HGT to GeoTIFF earlynot because HGT is “bad,” but because GeoTIFF plays nicely with
almost everything. Once converted, you can reproject, clip to your exact area, build mosaics, generate hillshade, and ship the
result to coworkers without needing a side conversation about arc-seconds. This is especially helpful when someone on the team
opens a raw tile and asks, “Why is it sideways?” (Answer: it’s not sideways; your symbology and coordinate assumptions are.)
Another surprisingly common experience is discovering that “resolution” is not just a bigger-is-better slider. A 3601×3601 tile
can be wonderfully detailed, but it can also be heavier to process, slower to render on older machines, and more sensitive to
voids and artifacts. Meanwhile, 1201×1201 tiles are often “good enough” for regional mapping, quick visualization, or baseline
analysis. People end up learning to pick resolution based on the actual question: Are you doing rough planning, or are you
modeling slope for a small site where a few meters matter?
Finally, there’s the “HGT in the wild” experienceseeing the same tiles show up in navigation apps, offline terrain packs, or
3D viewers. That’s when HGT stops being “a weird file I can’t open” and becomes “a useful building block.” Once you’ve opened
one successfully, you start noticing how often terrain data quietly powers modern maps. It’s the kind of file format that
doesn’t ask for attention… until it suddenly does. And when it does, now you know what to do.
Conclusion
An HGT file is a straightforward, widely used way to store SRTM elevation tiles: raw grids of “height” values tied to a naming
convention that tells software where the tile sits on Earth. To open one, use a GIS tool like QGIS, ArcGIS, or Global Mapper,
or convert it with GDAL to a friendlier format like GeoTIFF. Once loaded and styled (and once NoData is handled), an HGT file
becomes what it was always meant to be: a clean, practical terrain layer you can analyze, visualize, and build on.
Citations (hidden for web publishing):
