OSI-licensed only · self-hostable

Open-Source Mapbox Alternatives (2026)

Mapbox covers several jobs: a map-rendering SDK, vector tiles, routing and geocoding. Since mapbox-gl-js v2 the library is licensed under Mapbox's Terms of Service, so it is source-visible but not open source. The open-source ecosystem splits those jobs across several projects.

Every project below is under an OSI-approved licence (BSD, MIT, GPL-3.0), checked against its repository. You will usually combine one rendering library with a tile source and, if needed, separate routing and geocoding services.

Licences checked against each repository on November 7, 2026.

What you're replacing

  • •Interactive web maps with vector tiles
  • •Custom map styles
  • •Directions and routing
  • •Search and geocoding

At a glance

ToolBest forLicenceRuns as
MapLibre GL JSDrop-in vector-map renderingBSD-3-ClauseServer
LeafletSimple, lightweight web mapsBSD-2-ClauseServer
OpenLayersFeature-rich GIS in the browserBSD-2-ClauseServer
deck.glLarge-scale data visualisation on mapsMITServer
Protomaps (PMTiles)Serverless vector tiles from a single fileBSD-3-ClauseServer
ValhallaOpen-source routing engineMITDocker
NominatimGeocoding with OpenStreetMap dataGPL-3.0Docker

1. MapLibre GL JS

BSD-3-Clause

Best for: Drop-in vector-map rendering

An open-source library for publishing maps in web apps, continuing from the last open-source release of Mapbox GL JS. Renders vector tiles with WebGL.

Strengths

  • + Familiar API for Mapbox GL users
  • + Vector tiles and style specification
  • + Active community

Trade-offs

  • − Needs your own tile source
  • − Some newer Mapbox features are absent

2. Leaflet

BSD-2-Clause

Best for: Simple, lightweight web maps

A lightweight JavaScript library for interactive maps, with a large plugin ecosystem.

Strengths

  • + Small and easy to learn
  • + Mobile friendly
  • + Many plugins

Trade-offs

  • − Raster-tile focus by default
  • − Vector and 3D need plugins

3. OpenLayers

BSD-2-Clause

Best for: Feature-rich GIS in the browser

A high-performance library for dynamic maps, supporting many tile and vector formats and projections.

Strengths

  • + Broad format and projection support
  • + Powerful vector handling
  • + Mature project

Trade-offs

  • − Steeper learning curve
  • − Larger API surface

4. deck.gl

MIT

Best for: Large-scale data visualisation on maps

A WebGL-powered framework for visual exploration of large datasets, usable on top of a base map library.

Strengths

  • + Great for big geospatial datasets
  • + Layer-based API
  • + Works with MapLibre

Trade-offs

  • − Not a base map by itself
  • − Requires WebGL familiarity

5. Protomaps (PMTiles)

BSD-3-Clause

Best for: Serverless vector tiles from a single file

PMTiles is a single-file archive format for map tiles that can be served from static storage. The reference implementations in the repository are BSD-3.

Strengths

  • + No tile server to run
  • + Static hosting friendly
  • + Works with MapLibre

Trade-offs

  • − You manage your own tile generation
  • − Sample tilesets have their own licences

6. Valhalla

MIT

Best for: Open-source routing engine

A routing engine and library for OpenStreetMap data supporting multiple travel modes, isochrones and map matching.

Strengths

  • + Multiple travel modes
  • + Isochrones and matrix routing
  • + MIT licence

Trade-offs

  • − Needs OSM data processing
  • − Self-hosting is resource intensive

7. Nominatim

GPL-3.0

Best for: Geocoding with OpenStreetMap data

A search engine for OpenStreetMap data that supports forward and reverse geocoding.

Strengths

  • + Open geocoding on OSM data
  • + Self-hostable
  • + Long project history

Trade-offs

  • − Import and updates are heavy
  • − GPL-3.0 licence

New open-source tools, weekly

One email a week with the open-source projects, launches and releases added to TechLogHub. Unsubscribe in one click.

Get the TechLogHub digest

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

How to choose

If you need…Start with
Replace Mapbox GL JS with minimal code changesMapLibre GL JS
A simple map on a content siteLeaflet
GIS-style projections and formatsOpenLayers
Visualise millions of pointsdeck.gl with MapLibre
Self-hosted tiles without a tile serverProtomaps
Routing and geocodingValhalla and Nominatim

Often called open source, but aren't

Public source code, but under licences the Open Source Initiative doesn't approve. Fine to use; read the terms first.

  • Mapbox GL JS (Mapbox TOS (proprietary))

    Source for v2 and later is public, but it is licensed under the Mapbox Terms of Service for use with Mapbox products, so it is not open source.

Open-source Mapbox alternatives: FAQ

Quick answers to common questions

Is Mapbox open source?

Not in recent versions. mapbox-gl-js v2 and later is under Mapbox's Terms of Service. MapLibre GL JS continues from the last BSD-licensed version.

What is the best open-source Mapbox alternative?

MapLibre GL JS for vector maps with a similar API, or Leaflet for simple maps.

Do I still need map data?

Yes. These libraries render tiles but don't supply them. You can host OpenStreetMap-based tiles yourself or use a tile provider.

Can I use MapLibre with Mapbox styles?

MapLibre follows the style specification derived from Mapbox's, but some Mapbox-specific style features and hosted services may not carry over.

What replaces Mapbox Directions and Geocoding?

Valhalla provides routing and Nominatim provides geocoding, both self-hostable, with OpenStreetMap data.

Maintain an open-source Mapbox alternative?

List it on TechLogHub and we'll review it for this page.

Submit a project