Various chrome extensions store data about their settings and other persistent information (whitelists for adblock and ghostery, scripts for tampermonkey, styles for stylish, etc). Where do they store it? How can I view and edit it?
-
They store it within the Chrome user profile directory. – Ramhound Jul 19 '15 at 01:37
-
@Ramhound I'm hoping for more info than that. Are they in [profle]/Local Extension Settings/*/*.ldb, and if so what tools can I use to view/edit those dbs? Are they somwhere in Extensions/*/, and if so where? – Sparr Jul 19 '15 at 02:08
-
1@Ramhound I don't need help finding the profile directory. It's in ~/.google-chrome/Default/ on Ubuntu (and I know where it is on OSX and Windows, too). I need help finding the extension data *inside* the profile directory. – Sparr Jul 19 '15 at 02:38
-
The LDB extension looks to be a LevelDB file. My extension localstorage is stored `AppData\Local\Google\Chrome\User Data\Default\Local Storage\leveldb`. This post contains a bit more info about the LDB https://superuser.com/questions/1065771/what-embedded-database-format-is-used-by-this-chrome-extension – edmundo096 Sep 17 '17 at 18:00
-
Possible duplicate of [What embedded database format is used by this Chrome extension?](https://superuser.com/questions/1065771/what-embedded-database-format-is-used-by-this-chrome-extension) – kenorb Jan 07 '18 at 17:09
-
@kenorb: No it's clearly not a duplicate. This question is asking *which specific user directories under Chrome ~/Default* the extensions are using. LevelDB is only adjacent to a part of the answer. – smci Jan 04 '23 at 00:22
3 Answers
Some data Google Chrome stores in Local Storage folder in SQLite format (.localstorage files). See: How do I open Local Storage files in Google Chrome?
Some other data which is stored in IndexedDB folders (for each profile) (see: Where does Google Chrome save LocalStorage from Extensions?) are in LevelDB format. It's an open source key-value store format developed by Google and it is hosted on GitHub.
To modify files in LevelDB format outside of Chrome, it's not a straightforward process as you would need to implement a compatible comparator in order to inspect Chrome's Indexed DB leveldb instances. See: How to access Google Chrome's IndexedDB/LevelDB files?
- 24,736
- 27
- 129
- 199
-
1it requires a password to view. I tried my old computer's password but it doesn't work. – user2720402 Jul 20 '19 at 16:57
Another profile folder worth looking into is Local Extension Settings, which contains LevelDB stores.
There's a question on Software Recommendations seeking a LevelDB client, but there doesn't seem to be many good free options. For the extension I was messing with, using the leveldb Python library was enough:
>>> import leveldb
>>> db = leveldb.LevelDB('path/to/Chrome profile/Local Extension Settings/extension id')
>>> # Available library methods
>>> dir(db)
['CompactRange', 'CreateSnapshot', 'Delete', 'Get', 'GetStats', 'Put', 'RangeIter', 'Write', ...]
>>> # List of keys
>>> [x[0] for x in db.RangeIter()]
[bytearray(b'accessToken'), bytearray(b'count'), bytearray(b'fullListArr'), ...]
>>> # Access keys with bytestrings
>>> db.Get(b'donated')
bytearray(b'true')
>>> # Put values with bytestrings
>>> db.Put(b'donated', b'false')
- 434
- 1
- 4
- 11
Maybe you could check these:
- What is store in Local Storage used for in Chrome?
- How do I open `.localstorage` files from Local Storage folder?
It looks like SQLite format (.localstorage extension files).
Edit: You could also check development tool, then Application tab > Local Storage.
E.g. on Adblock option page: 
(source: image-share.com)
This file corresponds to ...\Data\profile\Default\Local Storage\chrome-extension_gighmmpiobklfepjocnamgkkbiglidom_0.localstorage
Please note that any change you make on the local storage may be overwritten by the web application/extension etc.
- 4,089
- 8
- 24
- 37
- 11
- 3