Skip to main content

Documentation Index

Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

clickhouse-js

View the source code and contribute on GitHub.
The official JS client for connecting to ClickHouse. The client is written in TypeScript and provides typings for the client public API. It has zero dependencies, is optimized for maximum performance, and is tested with various ClickHouse versions and configurations (on-premise single node, on-premise cluster, and ClickHouse Cloud). There are two different versions of the client available for different environments:
  • @clickhouse/client - Node.js only
  • @clickhouse/client-web - browsers (Chrome/Firefox), Cloudflare workers
When using TypeScript, make sure it is at least version 4.5, which enables inline import and export syntax. The client source code is available in the ClickHouse-JS GitHub repository.

Environment requirements (Node.js)

Node.js must be available in the environment to run the client. The client is compatible with all the maintained Node.js releases. As soon as a Node.js version approaches End-Of-Life, the client drops support for it as it is considered outdated and insecure. Current Node.js versions support:
Node.js versionSupported?
22.x
20.x
18.x
16.xBest effort

Environment requirements (web)

The web version of the client is officially tested with the latest Chrome/Firefox browsers and can be used as a dependency in, for example, React/Vue/Angular applications, or Cloudflare workers.

Installation

To install the latest stable Node.js client version, run:
npm i @clickhouse/client
Web version installation:
npm i @clickhouse/client-web

Compatibility with ClickHouse

Client versionClickHouse
1.12.024.8+
Likely, the client will work with the older versions, too; however, this is best-effort support and is not guaranteed. If you have a ClickHouse version older than 23.3, please refer to ClickHouse security policy and consider upgrading.