GitHub

About PouchDB

PouchDB is an in-browser database that allows applications to save data locally, so that users can enjoy all the features of an app even when they're offline. Plus, the data is synchronized between clients, so users can stay up-to-date wherever they go.

PouchDB also runs in Node.js and can be used as a direct interface to CouchDB-compatible servers. The API works the same in every environment, so you can spend less time worrying about browser differences, and more time writing clean, consistent code.

PouchDB is a free open-source project, written in JavaScript and driven by our wonderful community. If you want to get involved, then check out the contributing guide.

Installing

To start using PouchDB in your website, simply download it and include it in your page:

<script src="pouchdb-4.0.0.min.js"></script>

Or install it with Bower:

$ bower install --save pouchdb

Or install it as a Node.js module:

$ npm install --save pouchdb

Using PouchDB

In the browser, getting started is as simple as:

var db = new PouchDB('my_database');

In Node.js, you'll need to require() it first:

var PouchDB = require('pouchdb');
var db = new PouchDB('my_database');

Or, to use PouchDB as a direct client to CouchDB, simply pass in a URL:

var db = new PouchDB('http://localhost:5984/my_database');

All of these dbs share the same API, regardless of where they're storing data!

To learn more about how to use PouchDB, check out our Getting Started Tutorial, Guides and the API Documentation.

Browser Support

PouchDB supports all modern browsers, using IndexedDB under the hood and falling back to WebSQL where IndexedDB isn't supported. It is fully tested and supported in:

  • Firefox 29+ (Including Firefox OS and Firefox for Android)
  • Chrome 30+
  • Safari 5+
  • Internet Explorer 10+
  • Opera 21+
  • Android 4.0+
  • iOS 7.1+
  • Windows Phone 8+

PouchDB also runs in Cordova/PhoneGap, NW.js, Electron, and Chrome apps. It is framework-agnostic, and you can use it with Angular, React, Ember, Backbone, or your framework of choice. There are many adapters, or you can just use PouchDB as-is.

PouchDB requires a modern ES5 environment, so if you need to support older browsers (IE <10, Android <4.0, Opera Mini), then you should include the es5-shim library. You can also use the LocalStorage and in-memory adapters, or fall back to a live CouchDB.

Node.js

In Node.js, PouchDB uses LevelDB under the hood, and also supports many other backends via the LevelUP ecosystem.

PouchDB can also run as its own CouchDB-compatible web server, using PouchDB Server.

Downloads

Latest and greatest:

PouchDB is also hosted on jsdelivr and cdnjs.

For past releases and changelog, check out the Github releases page.

For plugins, see the plugins page.