.OSM

OSM File

OpenStreetMap data file
Ask a question
QUICK ANSWER

An OSM file is raw OpenStreetMap geographic data - points, lines, and areas with tags - stored as plain XML. Open it in JOSM or QGIS to see it on a map. For large regional extracts, use the .osm.pbf version instead; raw XML for a whole country runs into many gigabytes.

Developer: OpenStreetMap Foundation (community project) Category: GIS Files Open standard MIME: application/vnd.openstreetmap.data+xml
OPENS ON Windows macOS Linux Web
Related: .GPX · .GML · .KML · .SHP

On this page

19k+ extensions indexed
Last reviewed Jun 17, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the OSM file format?

.osm (short for OpenStreetMap) is a file format used by OpenStreetMap editors and GIS software. .osm files contain geographic map data and can store information for areas of any size - from small neighborhoods to global street networks.

.osm files store data in XML format (UTF-8 encoded, MIME type application/vnd.openstreetmap.data+xml). Each file opens with an XML declaration followed by an <osm version="0.6"> root element. Because raw .osm files can grow very large, they are frequently distributed in compressed form as .osm.bz2 or .osm.gz.

.osm files store geographic data in a structured manner using three primitive element types. <node> elements represent point locations with WGS84 latitude and longitude coordinates. <way> elements are ordered sequences of node references forming roads, waterways, and building outlines. <relation> elements group nodes, ways, and other relations to model complex structures such as turn restrictions or administrative boundaries. Each element carries <tag k="..." v="..."/> key-value pairs describing its real-world properties.

planet.osm is the complete OpenStreetMap database export, which can be accessed and modified by any registered user. Users can add new features or edit those already included. The uncompressed planet file exceeds 2 TB, so most users download regional extracts or prefer the compact binary .pbf format. Incremental map updates are distributed as .osc OsmChange files.

Security & safety

RISK: LOW

OSM XML is plain text with no executable content, so opening it is harmless. The only practical caution: very large extracts (region/planet) can exhaust memory in editors and text viewers - use the .osm.pbf binary and tools like osmium for big data. The data is openly licensed (ODbL); reusing it requires attribution to OpenStreetMap contributors.

Format details

in a nutshell
FULL NAMEOpenStreetMap data fileaka OSM XML, OpenStreetMap XML data
DEVELOPEROpenStreetMap Foundation (community project)since 2005 (OSM XML API v0.3 era); current OSM data model API v0.6 since 2009
CATEGORYGIS Files
MIME TYPEapplication/vnd.openstreetmap.data+xml
TYPEXML text (vector geographic data)
STANDARDOpen · royalty-free
This extension is also used by…
  • Osmand / OruxMaps offline map data - Apps render maps from OSM-derived data, but their packaged map files use other extensions (.obf, .map), not .osm.

Programs that open OSM files

Windows4 apps
Merkaartor Open-source Open the .osm to view/edit OSM data with a map background. (Active OSM editor.)
JOSM Open-source File > Open the .osm to view and edit nodes/ways/relations over an aerial/map background. The primary desktop OSM editor (Java).
QGIS Open-source Layer > Add Vector Layer (or drag the .osm in); the OSM driver loads points/lines/polygons as GIS layers.
Notepad / any text editor Open-source Open small .osm files to read the raw XML tags directly. Impractical for large extracts.
macOS3 apps
Merkaartor Open-source Open the .osm to inspect or edit OSM objects on macOS.
JOSM Open-source Run the cross-platform Java app; File > Open the .osm to edit it.
QGIS Open-source Add the .osm as a vector layer to view and analyse the data.
Linux3 apps
Merkaartor Open-source Open the .osm to view and edit OSM data.
JOSM Open-source File > Open the .osm in JOSM (java -jar josm.jar or distro package).
QGIS Open-source Add Vector Layer to load the .osm; use osmconf.ini to control which tags become attribute columns.
Web1 app
openstreetmap.org Free The live map itself; use the Export tab to download an area as .osm, or the iD editor (Edit) to edit it in the browser.

Technical details

deep spec
File encodingUTF-8 plain text (XML)
MIME typeapplication/vnd.openstreetmap.data+xml
Root element<osm> carrying version="0.6", a generator attribute and an optional <bounds> child
Primitive element typesThree: <node> (lat/lon point), <way> (ordered node-reference list), <relation> (grouped elements)
Coordinate systemWGS84 geographic coordinates; latitude and longitude stored as decimal degrees with up to 7 decimal places (nanodegree precision)
Tag systemUnlimited <tag k="..." v="..."/> key-value pairs per element; keys and values are free-form UTF-8 strings with no enforced vocabulary
Per-element metadataEach element stores id (64-bit integer), version number, changeset ID, timestamp, uid and user attributes tracking edit history
Typical file sizeA few KB for a single-object export; many GB for a country extract; planet.osm raw XML exceeds 2 TB uncompressed
File identificationNo binary magic bytes; identified by XML declaration followed by an <osm> root containing <node>, <way> or <relation> children
CompressionNone in raw .osm; routinely compressed to .osm.bz2 or .osm.gz for distribution; binary sibling .osm.pbf uses Protocol Buffers + zlib
Data integrityNo built-in checksum; integrity relies on well-formed XML and globally unique element id/version pairs
API schema versionOSM data model API v0.6, introduced 2009 and still current; declared via version="0.6" on the <osm> root element
Incremental update formatMap edits are exchanged as .osc (OsmChange) files, not plain .osm; .osc wraps the same primitives inside <create>, <modify> and <delete> blocks
Element ID size64-bit signed integers, permitting billions of unique node, way and relation IDs in the global database
Spatial bounding boxOptional <bounds minlat="..." minlon="..." maxlat="..." maxlon="..."/> element declares the geographic extent of the extract
Released2005 (OSM XML API v0.3 era); current OSM data model API v0.6 since 2009
Latest versionOSM XML schema tied to API v0.6 (2009, still current in 2026)
Open standardYes · royalty-free
Specificationwiki.openstreetmap.org

OSM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with OSM files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about OSM files.

Frequently asked questions

How do I open an .osm file?
Open it in JOSM (the OpenStreetMap editor) or QGIS to see it on a map. Because it's XML, a text editor shows the raw nodes, ways and tags - fine for small files, impractical for large extracts.
Is an .osm file an image?
No. It's the raw vector data (points, lines, areas with tags) behind the map, not a rendered picture. You need a GIS/editor like QGIS or JOSM to draw it on a map.
What's the difference between .osm and .osm.pbf?
Same OpenStreetMap data, different encoding: .osm is verbose XML (human-readable, huge); .osm.pbf is a compact binary (Protocolbuffer Binary Format) that's far smaller and faster. Use PBF for big areas, XML for small edits.
How do I convert OSM data to a Shapefile or GeoJSON?
Use GDAL's ogr2ogr or QGIS. They split OSM into points/lines/polygons; you choose which OSM tags become attribute columns (via osmconf.ini in GDAL).
Why is my .osm file so large / won't open?
Raw XML for a whole country can be many gigabytes and will overwhelm text editors. Download the .osm.pbf version instead and process it with osmium or osmconvert, or load it into QGIS/PostGIS.
Where do I download .osm data?
Export a small area from openstreetmap.org, grab regional extracts from Geofabrik or BBBike, or query the Overpass API for specific features. Large downloads come as .osm.pbf or .osm.bz2.

References

1OpenStreetMap Wiki - OSM XMLwiki.openstreetmap.org
2OpenStreetMap Wiki - Elements (node/way/relation)wiki.openstreetmap.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.JPGJPEG Image
4.PARTPartial Download File
5.MDMarkdown Document
6.BINCD/DVD Disc Image (BIN/CUE)
7.EXEWindows Executable (Portable Executable)
8.DATProgram Data File (generic)
9.RPMSGRestricted Permission Message
10.DBSQLite Database File

Related extensions

.GPXGPS Exchange Format
.GMLGeography Markup Language
.KMLKeyhole Markup Language
.SHPEsri Shapefile (geospatial vector data)
.RTMAPCompeGPS / TwoNav Tiled Raster Map
.KMZKeyhole Markup Language Zipped (Google Earth)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z