Stay organized with collections
Save and categorize content based on your preferences.
This page describes the JDBC drivers that Spanner supports for
GoogleSQL-dialect databases and PostgreSQL-dialect databases. You can use these drivers to connect to
Spanner from Java applications. Spanner supports the
following JDBC drivers:
The Spanner JDBC driver, which is an open-source JDBC driver that is
written, provided, and supported by Google, similar to the
Cloud Client Libraries. This is the
recommended JDBC driver for Spanner, especially for the GoogleSQL
dialect. You can also use it to connect to PostgreSQL-dialect databases.
The PostgreSQL JDBC driver in combination with PGAdapter. This
driver only supports PostgreSQL-dialect databases.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# JDBC drivers\n\nThis page describes the JDBC drivers that Spanner supports for\nGoogleSQL-dialect databases and PostgreSQL-dialect databases. You can use these drivers to connect to\nSpanner from Java applications. Spanner supports the\nfollowing JDBC drivers:\n\n- The Spanner JDBC driver, which is an open-source JDBC driver that is written, provided, and supported by Google, similar to the [Cloud Client Libraries](/spanner/docs/reference/libraries). This is the recommended JDBC driver for Spanner, especially for the GoogleSQL dialect. You can also use it to connect to PostgreSQL-dialect databases.\n- The PostgreSQL JDBC driver in combination with PGAdapter. This driver only supports PostgreSQL-dialect databases.\n\n| **Note:** Spanner previously supported the Simba JDBC driver. If you already use the Simba driver with Spanner, you can continue to do so.\n\nFor information about the Spanner JDBC driver, see [Spanner JDBC driver FAQ](/spanner/docs/open-source-jdbc) and\n[How to use the Spanner JDBC driver](/spanner/docs/use-oss-jdbc).\n\nFor information about the PostgreSQL JDBC driver, see\n[Connect JDBC to a PostgreSQL-dialect database](/spanner/docs/pg-jdbc-connect)."]]