Glacier length is an important measure of glacier geometry. Nevertheless, global glacier inventories are mostly lacking length data. Only recently semi-automated approaches to measure glacier length have been developed and applied regionally. Here we present a first global assessment of glacier length using an automated method that relies on glacier surface slope, distance to the glacier margins and a set of trade-off functions. The method is developed for East Greenland, evaluated for East Greenland as well as for Alaska and eventually applied to all ~ 200 000 glaciers around the globe. The evaluation highlights accurately calculated glacier length where digital elevation model (DEM) quality is high (East Greenland) and limited accuracy on low-quality DEMs (parts of Alaska). Measured length of very small glaciers is subject to a certain level of ambiguity. The global calculation shows that only about 1.5% of all glaciers are longer than 10 km, with Bering Glacier (Alaska/Canada) being the longest glacier in the world at a length of 196 km. Based on the output of our algorithm we derive global and regional area–length scaling laws. Differences among regional scaling parameters appear to be related to characteristics of topography and glacier mass balance. The present study adds glacier length as a key parameter to global glacier inventories. Global and regional scaling laws might prove beneficial in conceptual glacier models.