Pick SQLite when one application needs its own local database: it's a library inside your app that keeps everything in a single file, needs no server and is in the public domain. Pick PostgreSQL when several users, apps or servers write to the same data over a network, or your site is busy and write-heavy. SQLite's own documentation puts it bluntly: it doesn't compete with client/server databases such as PostgreSQL, it competes with fopen(), the basic call a program uses to open a file.
This is one of those comparisons where the projects themselves give the clearest answer. I read SQLite's about, appropriate uses, serverless and copyright pages, and PostgreSQL's about, licence and versioning pages, and here's what they say about where each one belongs.
SQLite and PostgreSQL compared
| SQLite | PostgreSQL | |
|---|---|---|
| How it runs | An in-process library, with no separate server process | A client/server database system |
| Where the data lives | One cross-platform disk file | Managed by the database server |
| Built for | Local storage for single apps and devices | Shared data with integrity and fault tolerance |
| Writes | Unlimited readers, one writer at any instant | Designed for many clients over a network |
| Setup | Zero-configuration | Install and run a server process |
| Licence | Public domain, free for any purpose | PostgreSQL License, similar to BSD or MIT |
| Free option (as of October 2026) | Yes, the whole library | Yes, the whole project |
The one-writer rule that settles most projects
SQLite's appropriate uses page is unusually frank about its limits. It supports an unlimited number of simultaneous readers but only one writer at any instant. Writers queue up, and for many apps that's fine because each lock lasts no more than a few dozen milliseconds. But if many threads or processes need to write at the same moment and can't take turns, the page tells you to pick a client/server engine instead.
It gives a website rule of thumb too. Any site with fewer than 100K hits a day should work fine with SQLite, and the docs call that a conservative estimate rather than a hard ceiling. Write-intensive sites, or ones busy enough to need several servers, are where SQLite itself points you to an enterprise-class client/server database. The other warning sign is data that sits on a different machine from the code that queries it, since SQLite is built into the application and works best when the data file is on the same device.
Why SQLite turns up everywhere
SQLite says it's in every Android device, every iPhone, every Mac, every Windows 10 and 11 installation and every Firefox, Chrome and Safari browser. The library can be under 900KiB, and a complete database with tables, indices, triggers and views sits in one file you can copy between 32-bit and 64-bit systems. The US Library of Congress recommends SQLite files as a storage format, and the maximum database size is 281 terabytes.
The licence is the simplest you'll find. All of SQLite's code is in the public domain, so anyone can copy, modify, use, sell or distribute it for any purpose. Companies that want legal paperwork anyway can buy a Warranty of Title from Hwaci, the company that employs the developers. One quirk: SQLite is open source but not open contribution, so it doesn't accept patches from people who haven't signed a public domain affidavit.
What PostgreSQL gives you as a server
PostgreSQL describes itself as a powerful, open source object-relational database with nearly 40 years of development behind it, going back to the POSTGRES project at the University of California, Berkeley, in 1986. It's been ACID-compliant since 2001, runs on all major operating systems and lets you define your own data types and functions, with add-ons such as the PostGIS geospatial extender.
Its versioning policy is clear: a new major version about once a year, minor releases with fixes at least every three months, and five years of support for each major version. Major upgrades need a dump and reload or the pg_upgrade tool, which is worth planning for on a database that's meant to run for years.
Five questions to settle it
- Is the data on the same machine as the code that queries it? SQLite fits; if it's across a network, choose PostgreSQL.
- Will many processes write at exactly the same moment? PostgreSQL.
- Are you shipping a desktop, mobile or embedded app? That's the job SQLite was built for.
- Do you need central control over shared company data? SQLite's docs say that's what client/server engines emphasise.
- Do you expect a very large dataset? SQLite keeps everything in one file, so a server that spreads data across disks suits better.
Before you commit, my piece on choosing a good database for your business covers the business side, and these data analytics tools work with either one once your data's in place.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
My advice on SQLite or PostgreSQL
Don't treat this as a contest. If your app runs on one machine, has modest traffic and you want zero setup, SQLite is the sensible default, and its own guidance says that covers most low to medium traffic websites. As soon as several servers, users or background jobs need to write at the same time, move to PostgreSQL, ideally before launch rather than after a busy month. You can also use both in one product: SQLite on the device or in a desktop app, PostgreSQL for the shared data behind it.
Do you make database tools? Tool makers can ask to be considered for a featured place in comparisons like this one.
Frequently asked questions
Is SQLite free for commercial use?
Yes. SQLite's code is in the public domain, so it's free for any purpose, commercial or private. Hwaci sells a Warranty of Title to companies that want legal proof of their right to use it.
Can SQLite run a website?
SQLite's guidance says it works for most low to medium traffic websites, and that sites with fewer than 100K hits a day should be fine. It calls that a conservative estimate.
How many writers can SQLite handle at once?
SQLite supports an unlimited number of simultaneous readers but only one writer at any instant. Other writers queue up and take turns.
Is PostgreSQL free?
Yes. PostgreSQL is free and open source under the PostgreSQL License, which the project describes as a liberal licence similar to the BSD or MIT licences.
How long is each PostgreSQL version supported?
The PostgreSQL Global Development Group supports each major version for five years after its first release, with minor fix releases at least every three months.


