localStorage API
localStorage keeps string keys and values across browser sessions. Serialize structured values, for example with JSON.stringify().
Preparing your comprehensive developer toolkit
Practical Guide
Search and edit the current site's localStorage, import string values from JSON, and export a backup.
Inspect the browser's persistent strings for the current origin. The tool lets you filter and edit entries and move a JSON backup between separate browser profiles for the same site.
localStorage keeps string keys and values across browser sessions. Serialize structured values, for example with JSON.stringify().
Browser policy can block access, and writes can fail at the quota. The size display measures text only.
An origin consists of scheme, host and port. Changes in other same-origin tabs are reported through the storage event.
Sizes are the sum of the UTF-8 byte lengths of the key and value. They do not measure how much browser quota is left.
Search by key or value, edit entries and see updates made in other same-origin tabs.
Validate JSON before writing, confirm overwrites and download a JSON backup.
See the UTF-8 size of each key and value, plus the total for the list.
Remove individual entries or confirm before clearing this origin's entire localStorage.
Prepare sample preferences without writing to storage until you select Import.
Filter by a key or value to find a setting or stale cached string.
Export a backup and import it in another profile for the same site.
Find large strings to decide which draft or cached entry to remove.
It can only access localStorage for this page's origin. For another site, open that site and inspect its storage in your browser's developer tools.
Import takes a non-empty object whose values are strings. Encode objects or arrays as JSON strings before putting them in the backup.
It shows the UTF-8 bytes of the key and value together. The total covers every entry, even when a search filter is active.
Adding a duplicate key is blocked. Importing a different value for an existing key asks for confirmation. Entries absent from the backup are kept.
Reference for persistent storage and how it is scoped to an origin.
Examples of storing strings and checking whether storage is available.
How other tabs and windows are notified of changes.
The Storage interface, key and value operations, and the rules for storage events.
Open the tool to try these features.