Tags - OpenStreetMap Wiki
Tags
From OpenStreetMap Wiki
(Redirected from
Key:
Jump to navigation
Jump to search
Help
Tags
In other languages
Afrikaans
asturianu
azərbaycanca
Bahasa Indonesia
Bahasa Melayu
bosanski
brezhoneg
català
čeština
Crnogorski
dansk
eesti
Esperanto
euskara
Frysk
Gàidhlig
galego
hrvatski
Ido
interlingua
íslenska
italiano
Kreyòl ayisyen
kréyòl gwadloupéyen
kurdî
latviešu
Lëtzebuergesch
lietuvių
magyar
Nederlands
norsk
norsk nynorsk
occitan
polski
português
română
sardu
shqip
slovenčina
slovenščina
srpski (latinica)
suomi
svenska
Tagalog
Tiếng Việt
Türkçe
Zazaki
Ελληνικά
беларуская
български
македонски
монгол
русский
српски / srpski
українська
հայերեն
עברית
العربية
سرائیکی
فارسی
پنجابی
پښتو
नेपाली
मराठी
हिन्दी
বাংলা
ਪੰਜਾਬੀ
தமிழ்
മലയാളം
සිංහල
ไทย
မြန်မာဘာသာ
한국어
ქართული
ⵜⴰⵎⴰⵣⵉⵖⵜ
中文(简体)
中文(繁體)
粵語
Other languages...
Tags
are attributes associated with map
elements
nodes
ways
, or
relations
). They describe specific properties of
map features
represented by those elements. A tag consists of two parts, a
key
and a
value
, separated by an equals sign (
). Both parts are free-format text fields, but often represent numeric or other structured values. A map element may have any number of tags.
Conventions are agreed on the meaning and use of tags, which are captured on this wiki. In some cases, there are competing visions what tags actually mean, or mappers using them in a different ways. As of January 2025
[update]
, OpenStreetMap
contains
over 99 thousand distinct keys and over 168 million distinct tags.
A limited number of tags may also be applied to
changesets
, describing metadata such as comment and data sources. See
changeset tags
for details.
Contents
Keys and values
Finding your tag
Technical specifications
Use in an editor
4.1
iD
4.2
StreetComplete
4.3
MapComplete
key=value syntax
Metadata
See also
Keys and values
Tags are applied to elements or changesets, resulting in a collection of tags of any size. However, each collection may only contain a key once. Where a tag is not present, there are often considered to be default values or values inherited from parent elements.
The
key
, therefore, is used to describe a topic, category, or type of feature (e.g.,
highway
or
name
). Keys can be qualified with prefixes, infixes, or suffixes (usually, separated with a colon, :), forming super- or sub-categories, or
namespace
. Common namespaces are language specification and a
date namespace
specification for name keys.
The
value
provides detail for the key-specified feature. Commonly, values are free-form text (e.g.,
name="Jeff Memorial Highway"
), one of a set of distinct values (an enumeration; e.g.,
highway=motorway
), multiple values from an enumeration (separated by a
semicolon
), or a number (integer or decimal), such as a distance. The value is obligatory for the tag, even if the key is self-explanatory (e.g.
motorcycle:rental=yes
).
Here are a few examples used in practice:
highway
residential
a tag with a key of
highway
and a value of
residential
which should be used on a
way
to indicate a road along which people live.
name
Park Avenue
a tag for which the value field is used to convey the name of the particular street
maxspeed
50
a tag whose value is a numeric speed and speed unit. The unit,
km/h
, is implied, but can be explicitly specified; miles per hour can be alternatively specified by appending
mph
. Across OSM, metric units are the default.
maxspeed:forward
=*
a key that includes a
namespace
for
maxspeed
to further distinguish its meaning.
name:de:1953-1990
Ernst-Thälmann-Straße
a tag with the
name
key suffixed
namespaces
to specify the German name which was valid in some years.
Finding your tag
The following resources are often used to find an appropriate tag or explore tag usage:
Browse this wiki
Map features
– a list of accepted tags grouped by key meaning.
Category:Features
– for tags grouped by their purpose or function.
Category:Proposed features
– to find
new tags
and
not-popular-yet
tags.
Category:Tags
How to map a
– an alphabetic list of real-world objects.
Search this wiki
Taginfo
– site that explores current tag usage in the OSM database, including keys and values that are not necessarily documented (but it includes links to this wiki if there is a documentation for a tag)
TagFinder
– Website providing full text search engine for OSM tags. (Also webservices available).
Name Suggestion Index
Look how
a similar object at another place is mapped (if you know where it might also exist)
Propose
any tags you like
Search the
tagging mailing list archive
or
questions about “tagging” at the help site
or
forum.openstreetmap.org
. Of course you also could ask at all three sites (but please only one at a time).
OSM Semantic Network
– a machine-readable structure containing the OSM tags
Technical specifications
Elements
describes the technical limitations, encoding and formatting of Tags.
Use in an editor
Main article:
Preset
Some OSM
editors
(for example
iD
Potlatch 3
MapComplete
) hide the tags of objects by default, making them not directly editable; instead users choose a
preset
and fill in a form. However, in most editors all tags can be displayed and edited by entering some kind of advanced mode of your editor.
iD
(only needed if you created a new object) Select the generic feature type preset (it is the bottom one). For example select “point” if you created a new “point” object.
Select “All tags” (bottom left)
StreetComplete
Press undo (bottom-left of the screen)
Select either last edit option or show edit history
On final confirmation screen StreetComplete will list tags that were added in edit (and would be modified by a revert)
MapComplete
MapComplete will hide tags for new users. Once a contributor has more then 25 changesets, the added tags will be shown just below the 'save'-button for a question and below the preset.
key=value syntax
In discussions and when working with certain tools, it is common to refer to a tag using the syntax
key=value
, that is, the
key
, then an equals sign, then the
value
. Sometimes, the key or value is surrounded by quotes to avoid confusion:
key="value"
or
"key"="value"
; the quotes (and, indeed, equals sign) are not part of the tag content.
The
key=value
syntax or a variant thereof is used in the following tools:
iD
– When a feature is selected, expand the Tags section of the left sidebar and change the view from
to
JOSM
– Right-click on the Tags panel and choose "Copy all Keys/Values".
Level0
Name Suggestion Index
– A tagset in key=value format is listed under each entry in the index.
OpenStreetMap Tags Editor
Osmium
Filter expressions
supplement key-value syntax with additional syntax for alternative keys or values.
Overpass turbo
– This syntax appears in OverpassQL as a
has-kv filter
and in the simpler
wizard
syntax.
Taginfo
– Enter key=value syntax into the search box to find a tag.
On this wiki, you can refer to a tag using key=value syntax by including the
{{
Tag
}}
template.
Sometimes, a relation
role
is given as
role=…
. This means the element's role in the relation is set to the value on the right side of the equals sign, not that a key named
role
=*
is set to that value.
Metadata
Some tags were used in data
elements
only for attaching metadata displayed in map editors or in quality assurance tools (such as completion status, things to do, approximations, data or imagery source, tool or editor version, etc.). Since version 0.6 of the API, map editors and import tools are encouraged to attach a few metadata tags to the
changesets
they create (changesets are not data elements) instead of tagging every added or modified data element: these tags are now documented on this wiki as "discardable", meaning that they may be silently deleted from data elements by editors when they update them (they are still usable in changesets, and these tags are still visible in older versions of elements where these discardable tags have been removed and you can still inspect these old tags from old changesets that did not use this now preferred tagging method because these changeset still point to the older versions of elements that had these tags).
See also
Syntactic conventions for new tags
Homonymous keys
Synonymous tags
Counterintuitive keys and values
Deprecated tags
Redundant tags
Discardable tags
OpenStreetMap data model
Elements
Node
Way
Relation
former
Segment
Tags
Key
Value
Semantic elements
Point
Linear features
Area
Relational
Related concepts
Changeset
Presets
Role
Retrieved from "
Categories
Tags
Concepts
Semantics
Hidden categories:
Pages unavailable in Dutch
Articles containing potentially dated statements from 2025
All articles containing potentially dated statements
Navigation menu