OPFS
Origin Private File System

The Origin Private File System (OPFS) is a private, sandboxed file system built into modern web browsers that lets a website store files directly on your device, isolated from your regular files and from every other website. It is part of the browser's File System API, and it is what makes it possible for a web app to keep large files — like images and PDFs — locally, without uploading them to a server.

How OPFS works

OPFS storage is origin-scoped: files written by one site (one domain) are visible only to that site, never to other sites or to the operating system's normal file browser. The data lives in a private area the browser manages on your disk. Because it is designed for app storage rather than user-facing documents, it is fast, supports large files, and persists between visits — but it is sandboxed, so a page cannot use it to read or write anywhere else on your computer.

OPFS vs. IndexedDB vs. a cloud upload

Browsers give a web app two main local stores. IndexedDB is a structured database, ideal for text records such as chat messages. OPFS is a file system, ideal for binary blobs such as images and PDFs. Both keep data on your device. A traditional cloud upload does the opposite: your file leaves your device and is stored on a company's servers, where it can be retained, indexed, or breached. For a fuller walkthrough, see local browser storage for AI chats: IndexedDB and OPFS explained.

Why OPFS matters for private AI

In a private AI chat like Secret Chat AI, the files you attach to a prompt are held in OPFS, so your uploads and chat history stay on your own device rather than in a vendor's cloud account. Note the honest boundary: when you actually send a prompt, its text (and any attached content the model must read) still reaches the AI provider's API to be answered — OPFS governs where your history is stored, not what a model receives. See how the two halves fit together on private AI models.

Frequently Asked Questions

  1. Can other websites read my OPFS files?

    No. OPFS is origin-scoped, meaning only the exact site that wrote a file can read it. Other websites have no access to it.

  2. Where are OPFS files actually stored?

    In a private, browser-managed area on your own device's disk. They do not appear in your normal file explorer, and they are not uploaded anywhere by the storage mechanism itself.

  3. What happens to OPFS data if I clear my browser?

    It is deleted, just like other site data. Because the files live only in your browser, clearing browser data or switching devices removes them — which is why apps that use OPFS usually offer an export/import option.

Related terms: Zero-Retention API · Training Opt-Out · all glossary terms