Easy cloud sync for any web app   game   tool   toy  

Easily sync local storage and IndexDB without hosting your own backend.

Start Using CloudSaver v2 Manage My Data

Quick Start

<!-- Add the script -->
<script src="https://cloudsaver2.pages.dev/main.js"></script>
<script>
  // Initialize CloudSaver
  CloudSaver.init();
</script>

API Reference

Config & Properties

Global settings used to customize the behavior of the sync engine.

CloudSaver.space = location.host; // Separate isolated "spaces"
CloudSaver.showIcon = true; // Toggle cloud icon visibility
CloudSaver.usr = { name: null, pass: null }; // User credentials
CloudSaver.init()

An all-in-one system that handles login popups, persistent logins, and automatic background syncing.

await CloudSaver.init();
Data Persistence

Manually trigger synchronization between the browser and the cloud.

// Force save everything, overriding other data
await CloudSaver.Save();

// Save only changed data (use for autosave)
await CloudSaver.SaveChanges();

// Pull cloud data into local storage
await CloudSaver.Load();
User & Data Management

Functions to trigger built-in UI components for account and data management.

await CloudSaver.ShowLoginPopup(); // Returns true/false
await CloudSaver.VerifyUser(); // Returns true/false
await CloudSaver.RenameUser(); // UI to rename user
CloudSaver.OpenDataManager(); // Data management UI

Limitations