# GeoJSON to OSM Converter

Convert GeoJSON format to OpenStreetMap (OSM) XML format

> Canonical page: https://elysiatools.com/en/tools/geojson-to-osm

- **Category:** Format Conversion

- **Keywords:** geojson, osm, openstreetmap, converter, gis, geographic, maps, geojson to osm

## Overview

The GeoJSON to OSM Converter is a specialized utility designed to transform geographic data from GeoJSON format into the OpenStreetMap (OSM) XML schema, enabling seamless integration of custom spatial features into mapping projects.

## Inputs

- **GeoJSON Input** (textarea): Enter GeoJSON data...
- **Node Start ID** (number): Starting ID for nodes (negative for new objects)
- **Way Start ID** (number): Starting ID for ways (negative for new objects)
- **Pretty Print Output** (checkbox)

## When to use

- When you need to import custom geographic shapes or points into OpenStreetMap editors like JOSM.
- When migrating spatial data from web-based GIS applications to desktop mapping environments.
- When preparing custom vector layers for offline map rendering or specialized OSM-based analysis.

## How it works

- Paste your GeoJSON data into the input field.
- Define custom starting IDs for nodes and ways to prevent conflicts with existing map data.
- Toggle the 'Pretty Print' option to ensure the resulting XML is clean and human-readable.
- Click the convert button to generate your OSM XML file for immediate download or use.

## Use cases

- Converting custom building footprints from municipal GIS data into OSM format.
- Transforming GPS-tracked paths into OSM ways for map contribution.
- Standardizing proprietary spatial data for use in open-source mapping projects.

## Frequently asked questions

### What is the difference between GeoJSON and OSM XML?

GeoJSON is a lightweight format for encoding geographic data structures, while OSM XML is a specific schema used by OpenStreetMap to represent nodes, ways, and relations.

### Why should I set custom Node and Way IDs?

Setting unique negative IDs helps prevent ID collisions when merging your converted data into an existing OSM dataset.

### Does this tool support complex relations?

The tool primarily maps standard GeoJSON geometries to OSM nodes and ways; complex relations may require manual adjustment in an OSM editor.

### Can I use this for large datasets?

Yes, but for extremely large files, ensure your browser has sufficient memory to process the XML transformation.

### Is the output compatible with JOSM?

Yes, the generated OSM XML follows standard formatting compatible with JOSM and other OpenStreetMap-compliant software.

## Related tools

- [JSON to XML Converter](https://elysiatools.com/en/tools/json-to-xml): Convert JSON data to XML format with customizable formatting options
- [OSM to GeoJSON Converter](https://elysiatools.com/en/tools/osm-to-geojson): Convert OpenStreetMap (OSM) XML data to GeoJSON format
- [Excel to JSON Converter](https://elysiatools.com/en/tools/excel-to-json): Convert Excel file to JSON format, extracting data from the first worksheet
- [XML to JSON Converter](https://elysiatools.com/en/tools/xml-to-json): Convert XML data to JSON format with customizable parsing options
- [BOM Character Remover](https://elysiatools.com/en/tools/data-bom-remover): Remove BOM (Byte Order Mark) characters from text and file content. Perfect for cleaning up text files that have encoding issues, fixing CSV imports, and preparing data for processing. Features: - Detect and remove UTF-8 BOM (EF BB BF) - Detect and remove UTF-16 BOM (FE FF or FF FE) - Detect and remove UTF-32 BOM (00 00 FE FF or FF FE 00 00) - Support multiple input formats - Visual BOM character display - Detailed detection report - Support for batch text processing Common Use Cases: - Fix CSV file import errors - Clean up text file encoding issues - Prepare data for JSON parsing - Fix XML parsing problems - Resolve API data encoding conflicts - Standardize text data format
- [XLSX Conditional Formatting Rule](https://elysiatools.com/en/tools/xlsx-conditional-formatting-rule): Batch-apply conditional formatting rules such as threshold highlights, data bars, and color scales to Excel worksheets
- [BSON Converter](https://elysiatools.com/en/tools/bson-converter): Encode and decode data to/from BSON (Binary JSON) format
- [CSON to JSON Converter](https://elysiatools.com/en/tools/cson-to-json): Convert CSON (CoffeeScript Object Notation) data to JSON format

## Samples

- [GeoJSON Viewer Samples](https://elysiatools.com/en/samples/geojson-viewer-samples): A GeoJSON sample for in-browser preview
- [Android Serialization Java Samples](https://elysiatools.com/en/samples/android-serialization-java): Android Java serialization examples including JSON serialization, deserialization, and XML parsing
- [Android Serialization Kotlin Samples](https://elysiatools.com/en/samples/android-serialization-kotlin): Android Kotlin serialization examples including JSON serialization, deserialization, and XML parsing
- [macOS Serialization Objective-C Samples](https://elysiatools.com/en/samples/macos-serialization-objectivec): macOS Objective-C serialization examples including JSON serialization, JSON deserialization, and XML parsing

## Related content

- [Geospatial Coordinate Conversion and Map Data Workflow](https://elysiatools.com/en/hubs/geospatial-coordinate-workflows): Normalize coordinate formats, verify locations, calculate distance and bearing, then convert GeoJSON, KML, OSM, and GPX data for downstream mapping work.
