localStorage is in a file, on your computer ;) For Firefox/Linux, it's in webappsstore.sqlite (guessing the same file exists for Windows/macOS too but can't verify, and Chrome probably have something similar).
Less fun: many "offline-capable" web apps that leverages PWA APIs/localStorage usually often allow you to download/upload a JSON representation of your data. I think I remember a graph drawing tool that allow you to do just that, but can't find a link to it right now.