Navigation

Driver Compatibility

note

The compatibility matrices show which versions of the driver are recommended for use with a given major release. Older driver versions may be able to connect to a version of MongoDB which is not recommended for that driver version; however, not all server features will be available.

C Driver Compatibility

MongoDB Compatibility

C Driver VersionMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
Version 1.16
Version 1.15
Version 1.14
Version 1.13
Version 1.12
Version 1.11
Version 1.10
Version 1.9
Version 1.8
Version 1.7
Version 1.6
Version 1.5
Version 1.4
Version 1.3
Version 1.2
Version 1.1
Version 1.0

The driver does not support older versions of MongoDB.

Language Compatibility

C Driver VersionsC11C99C89
All Versions

C++ Driver Compatibility

MongoDB Compatibility

C++ Driver VersionMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6MongoDB 2.4
mongocxx 3.5
mongocxx 3.4
mongocxx 3.3
mongocxx 3.2
mongocxx 3.1
mongocxx 3.0

The driver does not support older versions of MongoDB.

Language Compatibility

C++ Driver VersionC++03C++11C++14
mongocxx-3.x
legacy-1.x

C#/.Net Driver Compatibility

MongoDB Compatibility

C#/.NET Driver VersionMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
Version 2.10
Version 2.9
Version 2.8
Version 2.7
Version 2.6
Version 2.5
Version 2.4
Version 2.3
Version 2.2
Version 2.0
Version 1.11
Version 1.10

The driver does not support older versions of MongoDB.

Language Compatibility

Driver Version.NET 3.5.NET 4.0.NET 4.5.NET 4.6.NET 4.7.NET 4.8.NET Core 1.0.NET Core 1.1.NET Core 2.0.NET Core 2.1.NET Core 2.2
Version 2.10
Version 2.9
Version 2.8
Version 2.7
Version 2.6
Version 2.5
Version 2.4
Version 2.3
Version 2.2
Version 2.0
Version 1.11
Version 1.10

Go Driver Compatibility

MongoDB Compatibility

Go DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
1.3
1.2
1.1
1.0

Language Compatibility

The MongoDB Go driver requires Go 1.10 or later.

Java Driver Compatibility

MongoDB Compatibility

Java Driver VersionMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
Version 4.0
Version 3.12
Version 3.11
Version 3.10
Version 3.9
Version 3.8
Version 3.7
Version 3.6
Version 3.5
Version 3.4
Version 3.3
Version 3.2
Version 3.1
Version 3.0
Version 2.14 []
Version 2.13
Version 2.12

The driver does not support older versions of MongoDB.

[]() The 2.14 driver does not support all MongoDB 3.2 features (e.g., read concern); however, if you are currently on a version 2.x driver and would like to run against MongoDB 3.2 but cannot upgrade to driver version 3.2, use the 2.14 driver.

Language Compatibility

Java Driver VersionJava 5Java 6Java 7Java 8Java 11 []
Version 4.0
Version 3.12
Version 3.11
Version 3.10
Version 3.9
Version 3.8
Version 3.4
Version 3.3
Version 3.2
Version 3.1
Version 3.0
Versions >= 2.7
[]() Java versions 8 and above are all supported thanks to the JVM backwards compatibility promise. Only LTS versions will be explicitly listed in future.

Node.js Driver Compatibility

MongoDB Compatibility

Node.js DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
>= 3.5
>= 3.4
>= 3.3
>= 3.2.1
>= 3.1
>= 3.0
>=2.2.12
>=2.0.14
>=1.4.29

The driver does not support older versions of MongoDB.

Language Compatibility

Node.js DriverNode.js v0.8.XNode.js v0.10.XNode.js v0.12.XNode.js v4.X.XNode.js v6.X.XNode.js v8.X.XNode.js v10.x.xNode.js v12.x.x
3.5.X
3.4.X
3.3.X
3.2.X
3.1.X
3.0.X
2.2.X
2.1.X
2.0.X
>=1.4.18
1.4.X

Perl Driver Compatibility

MongoDB Compatibility

Perl DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
2.2
2.0
1.8
1.6
1.4
1.2
1.0

The driver does not support older versions of MongoDB.

Language Compatibility

The MongoDB Perl driver requires Perl 5.10.1 or later.

PHP Driver Compatibility

MongoDB Compatibility

PHP DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
ext 1.7 + lib 1.6
ext 1.6 + lib 1.5
ext 1.5 + lib 1.4
ext 1.4 + lib 1.3
ext 1.3 + lib 1.2
ext 1.2 + lib 1.1
ext 1.1 + lib 1.0
ext 1.0

Language Compatibility

PHP DriverPHP 7.4PHP 7.3PHP 7.2PHP 7.1PHP 7.0PHP 5.6PHP 5.5
ext 1.7 + lib 1.6
ext 1.6 + lib 1.5
ext 1.5 + lib 1.4
ext 1.4 + lib 1.3
ext 1.3 + lib 1.2

Python Driver Compatibility

MongoDB Compatibility

Python DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
3.11 (beta)
3.10
3.9
3.8
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3.0
2.9
2.8
2.7

The driver does not support older versions of MongoDB.

Language Compatibility

Python 2 Compatibility

Python DriverPython 2.4Python 2.5, Jython 2.5Python 2.6Python 2.7, PyPy
3.11 (beta)
3.10
3.9
3.8
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3.0
2.9
2.8
2.7

Python 3 Compatibility

Python DriverPython 3.1Python 3.2PyPy3Python 3.3Python 3.4Python 3.5Python 3.6Python 3.7
3.11 (beta)
3.10
3.9
3.8
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3.0
2.9
2.8
2.7

note

  • Jython 2.5 is a Python 2.5-compatible alternative interpreter.
  • PyPy is a Python 2.7 and 3.2-compatible alternative interpreter.

Motor (Python async) Driver Compatibility

MongoDB Compatibility

Motor (Python async) DriverMongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
1.2
1.1
1.0
0.7
0.6
0.5
0.4
0.3
0.2
  • Motor 1.2 wraps PyMongo 3.6+
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0

The driver does not support older versions of MongoDB.

Language Compatibility

Motor (Python async) DriverPython 2.5Python 2.6Python 2.7Python 3.3Python 3.4Python 3.5Python 3.6
1.2
1.1
1.0
0.7
0.6
0.5
0.4
0.3
0.2
0.1
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0
  • Motor 0.1 wraps PyMongo 2.5.0

note

  • Motor version 0.5 and earlier requires Tornado, and supports the same version of Python as its supported Tornado versions do.
  • For asyncio support, Motor requires Python 3.4+, or Python 3.3 with the asyncio package from PyPI.
  • PyPy is not supported as it runs Motor code slowly.
  • Motor does not support Jython or Windows.

Ruby Driver Compatibility

MongoDB Compatibility

Ruby DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6MongoDB 2.4
2.10
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.0
1.12
1.11
1.10
1.9
1.8

The driver does not support older versions of MongoDB.

Ruby Compatibility

Ruby DriverRuby 2.6Ruby 2.5Ruby 2.4Ruby 2.3Ruby 2.2Ruby 2.1Ruby 2.0Ruby 1.9Ruby 1.8.7JRuby 9.2JRuby 9.1JRuby
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
1.12 - 1.9
1.8
1.7 - 1.6

Rust Driver Compatibility

MongoDB Compatibility

Rust DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
0.9.x

Language Compatibility

The MongoDB Rust driver requires Rust 1.39 or later.

Scala Driver Compatibility

MongoDB Compatibility

Scala DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
1.2
1.1
1.0

Language Compatibility

Scala DriverScala 2.13Scala 2.12Scala 2.11
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
1.1
1.1
1.0

Swift Driver Compatibility

MongoDB Compatibility

Swift DriverMongoDB 4.2MongoDB 4.0MongoDB 3.6MongoDB 3.4MongoDB 3.2MongoDB 3.0MongoDB 2.6
0.2.0

Language Compatibility

The MongoDB Swift driver requires Swift 5 or later.