Home / GIS and Open Map Data for Beginners

OpenStreetMap Speed Limits: The maxspeed Tag System and the Defaults Behind It

A speed limit 25 sign against a clear blue sky

Photo: Connor Scott McManus / Pexels

When a navigation app warns you about a speed limit, the number it shows had to come from somewhere, and in the OpenStreetMap world it comes from a tag system with more structure than its single key suggests. The key is maxspeed, and around it orbits a small constitution: how values are written, what units mean, how a limit that nobody tagged can still be known, and how a mapper records where a limit came from so the next mapper can trust it. Behind the tagged values stands the system's second half, the default speed limit tables on the OpenStreetMap wiki, country by country and road class by road class, which routers consult where no maxspeed is tagged. A router answering what is the limit here is really walking a chain: the tag if present, the implicit rule if the tag encodes one, the default table if neither speaks. This guide teaches the tag system and the fallback chain as one subject, because that is how the data behaves in the wild. The general grammar of tags, keys, values, and their etiquette, is owned by the tags guide linked below; here the subject is one key's complete world.

Interactive tool

Tag the Limit You Know: The maxspeed Checklist

Check off each step as you finish it. Your progress stays on this page.

0 of 7 complete

0% done

The Value Itself: Numbers, Units, and None

The base rule is a sentence long: a plain number in a maxspeed value is kilometers per hour. maxspeed=50 means 50 km/h, everywhere on earth, including in countries whose signs speak miles. Where the limit is known in miles per hour, the unit is written explicitly, with a space: maxspeed=25 mph is the correct form, and the space is not decoration; parsers read the value as number plus unit, and a value written 25mph is a malformed string a strict consumer may drop. That asymmetry, metric silent and imperial explicit, reflects the project's founding conventions, and it produces the classic beginner's error of tagging a British 30 mph road as maxspeed=30, thereby declaring 30 km/h and slowing every router's estimate on that road. Two special values complete the core vocabulary. maxspeed=none asserts there is no legal limit, a real condition on certain roads, famously stretches of German autobahn, and it is information, not an absence of it: it tells the router to stop looking for a limit rather than to guess one. And limits that vary, by time, by vehicle, by condition, are expressed through the conditional tagging machinery, maxspeed:conditional and its kin, which the wiki's maxspeed page documents for the cases that need it.

Implicit Limits: The Country and Zone Codes

Many limits are never written on a sign at the roadside because the law sets them by category: entering a built-up area changes the limit, a residential zone sets another. OpenStreetMap encodes such limits as implicit values of the form RO:urban: a country code, a colon, and a zone or road category, declaring that this road carries whatever limit that country's law assigns to that class. The form matters because it separates the fact the mapper observed, this road is an urban road in Romania, from the value the law currently attaches, which the consumer resolves from the default tables and which changes if parliament changes it, without any mapper revisiting the road. Related keys refine the picture: maxspeed:type records the kind of limit source in the same vocabulary, and zone tagging such as zone:traffic and zone:maxspeed marks the regulatory zones themselves. The discipline the system teaches is to tag what you know in the form that stays true: a number when the sign showed a number, a code when the limit flows from a category, and never a number you computed from a code, which hard-codes today's law into tomorrow's data.

A 25 mph speed limit sign on a rural road
A 25 mph speed limit sign on a rural road

Source:maxspeed: Where the Limit Came From

A limit without provenance is a rumor with good formatting, so the system carries source:maxspeed, recording where the value came from: a sign read in person (sign), a legal default the mapper applied knowingly (RO:urban style values appear here too), a maxspeed map or survey, and other documented sources. The key earns its keep in maintenance: when a road's limit is challenged, the source tells the next mapper whether they are arguing with a sign somebody stood in front of or with an inference somebody made at a desk, and those arguments deserve different weights. It also powers quality analysis, because data consumers and community QA tools can separate surveyed limits from assumed ones across a whole country at a stroke. Tagging the source costs a mapper seconds and buys the dataset its audit trail; the tag-family guides on this site repeat the pattern because it generalizes: in OpenStreetMap, the how-do-you-know keys are what turn a crowd's edits into a reference work.

The Defaults: The Wiki Tables Behind the Tags

Where no maxspeed is tagged and no implicit code speaks, a competent router does not shrug; it consults the default speed limit tables maintained on the OpenStreetMap wiki, which record, per country, the legal defaults by road class and vehicle context: urban and rural defaults, motorway values, living-street rules, and the variations that national law delights in. These tables are the fallback layer of the whole system, and they explain a phenomenon users misread constantly: an app showing a sensible limit on a road nobody ever tagged. The number came from the table, applied to the road's class and country, which is correct behavior and also a standing invitation to error when the road's real, signed limit differs from its class default, as exceptions always exist. For mappers, the tables define the highest-value survey work in this corner of the database: roads whose signed limits differ from their defaults are exactly the roads where a maxspeed tag changes what every router believes, and a source tag makes the correction stick.

How a Router Walks the Chain

Assemble the system as its consumers do. A router building a route encounters a way and asks for its limit. First, it reads maxspeed: a number with its unit rule, an explicit mph, or the special none, each decisive. Second, if the value is implicit, or if maxspeed:type and zone tags speak, it resolves the code against the country's rules. Third, absent any tag, it falls back to the wiki's default for that country and road class. The resolved limit then does its work in the routing engine: capping the speed the engine assumes on that segment, which shapes ETAs, route choice between a fast road and a short one, and the warnings the app can offer. Errors propagate with the same efficiency: a missing unit slows a road in the model, a wrong implicit code misprices a whole district, an untagged exception leaves the default lying politely. That is why this tag family, one key and its attendants, deserves a guide of its own: it is a small system whose outputs steer real vehicles, and whose inputs are a mapper's afternoon with a notebook, written carefully.

Tagging Well: A Short Field Discipline

The practice compresses to five rules. Tag the sign you saw, as a number, with mph written out where the sign speaks mph. Use implicit codes where the limit is categorical, and let the tables carry the number. Always add source:maxspeed when you can, sign above inference. Never convert silently: a 30 mph sign becomes 30 mph, not 50, not 30. Survey the exceptions: the road whose signed limit breaks its class default is the most valuable maxspeed edit in its neighborhood. Follow those, and the segment of the database you touch will steer strangers correctly, which is the entire point of the system this guide describes.

The Wider Family: Advisory, Vehicle, and Conditional Limits

The core key has relatives that a complete guide should seat at the table. maxspeed:advisory records the recommended speed where the legal limit differs from the sensible one, the sharp bend's yellow sign, which routers may weigh without treating as law. Vehicle-specific keys, of the maxspeed:hgv form and its siblings for buses and other classes, carry the limits that apply to one kind of traffic on a road whose general limit is another number, the raw material of truck routing. Conditional limits handle time and circumstance: maxspeed:conditional with the project's condition syntax expresses the school-zone limit that binds on weekday mornings and the variable limit a managed motorway posts by condition, values a consumer must evaluate against the clock rather than merely read. And the direction keys, maxspeed:forward and maxspeed:backward, settle the asymmetric road whose two directions carry different limits. Each relative follows the family's constitutional rules: numbers are kilometers per hour unless mph is written, codes stay codes, sources are recorded. The family is bigger than its famous member, and a mapper who knows the relatives stops forcing complex reality into a single number that cannot hold it.

Reading a Country's Limits Before You Travel or Route

The system has a consumer-facing payoff worth stating for readers who will never tag a road. When an application shows you a limit, you now know how to interrogate it: is this road tagged, and with what source, or is the number a class default wearing the road's name? The wiki's default tables are public, so a surprising limit on an untagged road can be checked against the country's table in a minute, and a limit that matches no tag and no default is a question worth asking the app's maker. For fleet operators and routing engineers the same literacy scales into policy: coverage of surveyed maxspeed in your operating area is a measurable property of the dataset, separable by the source key, and the decision to trust OSM limits for compliance-adjacent features should be made on that measurement, not on the map's general reputation. The tags were always an audit trail; this section is merely the reminder that audits can be read from both ends.

The field discipline above has a desk-bound twin worth one sentence: when you correct a limit from a reliable source, a sign photograph, an official schedule, change the value and the source together, every time, so the record never claims a provenance the edit did not have.

Related Guides

If this page answered part of the question, these GIS guides cover the rest of the same ground:

Frequently Asked Questions

What does maxspeed=50 mean?

Fifty kilometers per hour. A plain number in maxspeed is always metric. Miles per hour must be written explicitly with a space, as in maxspeed=25 mph; a value like 25mph is malformed.

What is an implicit speed limit in OpenStreetMap?

A limit expressed as a country and category code, such as RO:urban, declaring that the road carries whatever limit that country's law assigns to that class. Consumers resolve the code against the default tables, so the data stays correct if the law changes.

What does maxspeed=none mean?

That there is no legal speed limit on that road. It is positive information, not missing data: it tells routers to stop looking for a limit instead of applying a default.

Where do routers get limits for roads with no maxspeed tag?

From the default speed limit tables on the OpenStreetMap wiki, which record legal defaults per country and road class. The router applies the default for the road's class and country until a mapper tags the signed reality.

What is source:maxspeed for?

Provenance: it records where the limit came from, such as a roadside sign or a legal default. It lets later mappers weigh a surveyed limit against an inferred one, and lets quality tools separate the two across whole regions.

Photo credits: Connor Scott McManus (Pexels); Brett Sayles (Pexels). Photos are served from this site; follow the credit to the library page for the original.