Image Image

Offline-first data

Conflict-free SQLite sync from edge to cloud.

Turn any local SQLite database into an offline-first replica that syncs with SQLite Cloud, PostgreSQL, or Supabase when the network is available.

SQLite Sync

SQLite and PostgreSQL native extension

Best for

Offline sync and Markdown memory

Repository

GitHub

Project

What it is

SQLite Sync is a multi-platform extension that adds CRDT-based replication to ordinary SQLite tables. Applications write locally first, keep working offline, and converge automatically when they reconnect.

It is built for local-first apps, mobile and desktop software, IoT fleets, edge systems, and AI agents that need shared state without building a custom synchronization backend.

Why it matters

Zero latency.
Zero conflicts.

Modern applications cannot wait on the network for every decision. SQLite Sync keeps the hot path local while still giving teams a coordinated source of truth in the cloud.
Because changes merge deterministically, users and agents can update data independently without manual conflict resolution, dropped writes, or fragile client-side state machines.

Capabilities

Features and characteristics

CRDT-based replication

Causal-Length Set, Delete-Wins, Add-Wins, and Grow-Only Set algorithms keep replicas convergent.

Block-level LWW

Line-level merge for text and markdown columns preserves independent edits to different blocks.

Built-in networking

Use the embedded network layer to send and receive sync packages with one SQL call.

Cloud destinations

Sync local SQLite replicas with SQLite Cloud nodes, PostgreSQL servers, or Supabase instances.

Row-level security

SQLite Cloud policies enforce which rows each client can sync in multi-tenant deployments.

Multi-platform

Runs on Linux, macOS, Windows, iOS, Android, and WASM, with platform packages available.

Sample code

Enable sync on a local table

Load the extension, initialize the table, write locally, then sync when connectivity is available.

-- Load SQLite Sync
.load ./cloudsync

CREATE TABLE tasks (
  id TEXT PRIMARY KEY,
  title TEXT NOT NULL DEFAULT '',
  done INTEGER NOT NULL DEFAULT 0
);

-- Enable CRDT sync on the table
SELECT cloudsync_init('tasks');

-- Use SQLite normally, even offline
INSERT INTO tasks (id, title)
VALUES (cloudsync_uuid(), 'Ship offline-first app');

-- Connect and synchronize when ready
SELECT cloudsync_network_init('your-managed-database-id');
SELECT cloudsync_network_set_apikey('your-api-key');
SELECT cloudsync_network_sync();
Subscribe to our newsletter
The latest news, articles, and resources, sent to your inbox.

© 2026 SQLite Cloud, Inc. All rights reserved.