Cloud Firestore Enterprise edition with MongoDB compatibility is now available!
Learn more.
Supported MongoDB data types and drivers
Stay organized with collections
Save and categorize content based on your preferences.
Relevant to Cloud Firestore Enterprise edition only.
|
The following tables list supported MongoDB data types and drivers for
Cloud Firestore with MongoDB compatibility.
Data types
BSON Type |
Supported |
32-bit Integer (int) |
Yes |
64-bit Integer (long) |
Yes |
Array |
Yes |
Binary Data |
Yes |
Boolean |
Yes |
Date |
Yes |
DBPointer |
No |
DBRef |
No |
Decimal128 |
Yes |
Double |
Yes |
JavaScript |
No |
JavaScript (with scope) |
No |
MaxKey |
Yes |
MinKey |
Yes |
Null |
Yes |
Object |
Yes |
ObjectId |
Yes |
Regular Expression |
Yes |
String |
Yes |
Symbol |
No |
Timestamp |
Yes |
Undefined |
No |
Document _id
The top-level _id
field in a document must be one of the following types:
- ObjectId
- String
- 64-bit Integer (long)
Other BSON types are not supported.
Languages and MongoDB drivers
Cloud Firestore with MongoDB compatibility supports the following driver versions:
Language |
Driver versions |
Notes |
Java |
5.x |
OIDC authentication from Google Cloud available starting in 4.10 |
Node.js |
6.x
5.x |
OIDC authentication from Google Cloud available starting in 6.7 |
Python |
4.x
3.x (x ≥ 12) |
OIDC authentication from Google Cloud available starting in 4.7 |
Go |
2.x |
|
C# |
3.x |
|
Ruby |
2.x (x ≥ 16) |
|
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[],[],null,["\u003cbr /\u003e\n\n\n|--------------------------------------------------------|\n| *Relevant to Cloud Firestore Enterprise edition only.* |\n\n\u003cbr /\u003e\n\nThe following tables list supported MongoDB data types and drivers for\nCloud Firestore with MongoDB compatibility.\n\nData types\n\n| **BSON Type** | **Supported** |\n|-------------------------|---------------|\n| 32-bit Integer (int) | Yes |\n| 64-bit Integer (long) | Yes |\n| Array | Yes |\n| Binary Data | Yes |\n| Boolean | Yes |\n| Date | Yes |\n| DBPointer | No |\n| DBRef | No |\n| Decimal128 | Yes |\n| Double | Yes |\n| JavaScript | No |\n| JavaScript (with scope) | No |\n| MaxKey | Yes |\n| MinKey | Yes |\n| Null | Yes |\n| Object | Yes |\n| ObjectId | Yes |\n| Regular Expression | Yes |\n| String | Yes |\n| Symbol | No |\n| Timestamp | Yes |\n| Undefined | No |\n\nDocument `_id`\n\nThe top-level `_id` field in a document must be one of the following types:\n\n- ObjectId\n- String\n- 64-bit Integer (long)\n\nOther BSON types are not supported.\n\nLanguages and MongoDB drivers\n\nCloud Firestore with MongoDB compatibility supports the following driver versions:\n\n| **Language** | **Driver versions** | **Notes** |\n|--------------|---------------------|------------------------------------------------------------------|\n| Java | 5.x | OIDC authentication from Google Cloud available starting in 4.10 |\n| Node.js | 6.x 5.x | OIDC authentication from Google Cloud available starting in 6.7 |\n| Python | 4.x 3.x (x ≥ 12) | OIDC authentication from Google Cloud available starting in 4.7 |\n| Go | 2.x | |\n| C# | 3.x | |\n| Ruby | 2.x (x ≥ 16) | |\n\nWhat's next\n\n- Run the [Quickstart: Create a database and connect to it](/docs/firestore/enterprise/create-and-query-database).\n- Learn about [Behavior differences](/docs/firestore/enterprise/behavior-differences).\n- For a breakdown of supported features depending on MongoDB version, see\n - [Supported features: 8.0](/docs/firestore/enterprise/supported-features-80)\n - [Supported features: 7.0](/docs/firestore/enterprise/supported-features-70)\n - [Supported features: 6.0](/docs/firestore/enterprise/supported-features-60)\n - [Supported features: 5.0](/docs/firestore/enterprise/supported-features-50)\n - [Supported features: 4.0](/docs/firestore/enterprise/supported-features-40)\n - [Supported features: 3.6](/docs/firestore/enterprise/supported-features-36)"]]