sqlite-vec

active

by Alex Garcia (sponsored by Mozilla Builders) · since 2024 · also known as sqlite-vss successor, vec0

Dependency-free SQLite extension for vector search that runs anywhere SQLite does, including WASM.

vectorrelationalextensionopen source (permissive)emerging

Overview

sqlite-vec is a small C extension by Alex Garcia that adds vector storage and KNN queries to SQLite through vec0 virtual tables and scalar functions, supporting float, int8 and binary vectors with metadata, partition and auxiliary columns. It has no dependencies, so it runs on servers, phones, Raspberry Pis and in the browser via WebAssembly, and it was sponsored by Mozilla Builders. The stable 0.1.x line does brute-force search (fast enough for hundreds of thousands to low millions of vectors); ANN indexes are being developed in the 0.1.10 alphas. Perfect for local-first and on-device RAG.

Strengths & trade-offs

Strengths

  • +Zero dependencies; runs anywhere SQLite runs, including the browser
  • +Vectors share SQLite transactions, joins and backups
  • +int8 and binary quantization shrink storage
  • +Pairs with FTS5 for hybrid search in one file
  • +Packages for Python, Node, Ruby, Go and Rust

Trade-offs

  • −No ANN index in stable releases, so large collections get slow
  • −Pre-1.0 with slow release cadence
  • −Single-writer SQLite concurrency limits
  • −One maintainer

Great for

  • +On-device RAG in desktop and mobile apps
  • +Local-first semantic search
  • +Browser-based vector search via WASM
  • +Small server apps already on SQLite or libSQL

Think twice for

  • −Tens of millions of vectors
  • −High write concurrency
  • −Multi-node deployments

Capabilities

Native or official first-party support · 10 of 25 tracked

✓Transactions
✓Joins
✓Secondary indexes
✓Full-text search
✓Vector search
✓JSON
✓Triggers
✓In-memory
✓Durable persistence
✓Runs in WebAssembly
–Geospatial
–Change data capture
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–Compression
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Strict
Architecture
Embedded
Query languages
SQL

Brute-force KNN in 0.1.x; comfortable up to roughly a few million vectors depending on dimensions and quantization.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withSQLite
apis & protocolsSQLite C API
client languagesPython, JavaScript, Go, Rust, Ruby, C

Alternatives to sqlite-vec

Compare all→
LanceDBVector27.5

Embedded, serverless retrieval database on the Lance columnar format for multimodal AI data.

sqlite-vec vs lancedb →
ChromaVector49.0

Open-source retrieval database for AI apps, from embedded Python to serverless Chroma Cloud.

sqlite-vec vs chroma →
pgvectorVector40.0

The standard Postgres extension for vector similarity search with HNSW and IVFFlat indexes.

sqlite-vec vs pgvector →
USearchVector23.1

Single-header C++ HNSW library with SIMD distance kernels and bindings for a dozen languages.

sqlite-vec vs usearch →
libSQLRelational29.1

Turso's open-contribution SQLite fork with native vectors, a network server and embedded replicas.

sqlite-vec vs libsql →
OramaSearch Engine19.6

Tiny TypeScript full-text, vector and hybrid search engine for browsers, servers and the edge.

sqlite-vec vs orama →

sqlite-vec FAQ

What is sqlite-vec?

sqlite-vec is a vector database by Alex Garcia (sponsored by Mozilla Builders), first released in 2024. sqlite-vec is a small C extension by Alex Garcia that adds vector storage and KNN queries to SQLite through vec0 virtual tables and scalar functions, supporting float, int8 and binary vectors with metadata, partition and auxiliary columns. It has no dependencies, so it runs on servers, phones, Raspberry Pis and in the browser via WebAssembly, and it was sponsored by Mozilla Builders. The stable 0.1.x line does brute-force search (fast enough for hundreds of thousands to low millions of vectors); ANN indexes are being developed in the 0.1.10 alphas. Perfect for local-first and on-device RAG.

Is sqlite-vec open source?

Yes. sqlite-vec is open source. License: MIT or Apache-2.0 (dual).

Does sqlite-vec support ACID transactions?

Yes. sqlite-vec supports full ACID transactions, with strong consistency.

Does sqlite-vec scale horizontally?

sqlite-vec does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run sqlite-vec?

You can self-host it, embed it in your application and run it at the edge.

What is sqlite-vec best for?

sqlite-vec is a strong fit for on-device RAG in desktop and mobile apps; local-first semantic search; and browser-based vector search via WASM. Think twice for tens of millions of vectors.

What are the best alternatives to sqlite-vec?

Common alternatives to sqlite-vec include LanceDB, Chroma, pgvector, USearch and libSQL. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is sqlite-vec?

sqlite-vec ranks #81 of 844 databases on the WhichDB Score (31.1/100), and #7 among vector databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.