@capacitor/preferences or Strata Storage?
The official Capacitor plugin for a small string key-value store, backed by UserDefaults on iOS, SharedPreferences on Android and localStorage on the web.
Last checked 7 Nov 2026. Open @capacitor/preferences
Who each one suits.
Choose @capacitor/preferences if a handful of string settings is all your Capacitor app stores and you want the plugin the Capacitor team maintains, with nothing else in the tree.
Choose Strata Storage if preferences are one store among several you reach, you store objects rather than strings, or you also want Keychain, SQLite, IndexedDB and cookies under one API with expiry and encryption as flags.
The stores, side by side.
“Not stated” means the pages we checked don’t mention it. It doesn’t mean the library can’t do it.
| Store | @capacitor/preferences | Strata Storage |
|---|
| localStorage | Partly (Used as the fallback when running as a PWA, not chosen directly) Checked 7 Nov 2026 Source | Yes |
|---|
| IndexedDB | Not stated on the pages we checked | Yes |
|---|
| sessionStorage | Not stated on the pages we checked | Yes |
|---|
| Cookies | Not stated on the pages we checked | Yes |
|---|
| URL parameters as a store | Not stated on the pages we checked | Yes |
|---|
| iOS Keychain | Not stated on the pages we checked | Yes |
|---|
| Android secure storage (Keystore-backed) | Not stated on the pages we checked | Yes |
|---|
| Native preferences (UserDefaults / SharedPreferences) | Yes Checked 7 Nov 2026 Source | Yes |
|---|
| Web and native stores behind one API | Partly (One API over one store per platform, string values only; the page says it is not meant to be used as a local database) Checked 7 Nov 2026 Source | Yes |
|---|
| No runtime dependencies | Yes (@capacitor/core is a peer dependency) Checked 7 Nov 2026 Source | Yes |
|---|
Licence, size, downloads.
| Fact | @capacitor/preferences | Strata Storage |
|---|
| Licence | MIT Source | MIT Source |
|---|
| npm version | 8.0.1 | 3.1.4 |
|---|
| Bundle size | 264 bytes gzipped, 354 minified. For version 8.0.1. Checked 7 Nov 2026. JavaScript side only; the native code is not counted by bundlephobia Source | 21,468 bytes gzipped, 79,645 minified. For version 3.1.4. Checked 7 Nov 2026 Source |
|---|
| Weekly downloads | 1,624,508, 31 Oct 2026 to 6 Nov 2026 Source | 486, 31 Oct 2026 to 6 Nov 2026 Source |
|---|
| Cost | Open source under the MIT licence; no price is stated on the pages we checked Source | Free to install and use; the website takes voluntary support of an amount the supporter chooses |
|---|
Coming from @capacitor/preferences?
The docs guide lists the calls that change and shows how to carry existing values over. Read the @capacitor/preferences guide
All 12 libraries