Origin Private File System (OPFS)
Gives the page a private, fast file system inside the browser, with no prompt.
In one line
Can keep large private files in the browser that you cannot browse yourself
Gives the page a private, fast file system inside the browser, with no prompt.
A site can store large files and databases on disk invisibly to the person. It is sandboxed per site, but it can fill gigabytes of disk and survives until site data is cleared.
What it can and can't do
What the user does: Nothing. It happens when the app stores data such as a database or editor project.
It can
- Store files quickly in a private area inside the browser
- Hold large data, up to the site's storage limit
- Work offline with it
- Do all this with no prompt
It cannot
- See your real files or folders on the computer
- Be seen by other sites
- Show up in your file manager
- Keep data after you clear site data
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 86 | 2020-10-20 | None |
| Edge | Supported | 86 | 2020-10-09 | None |
| Firefox | Supported | 111 | 2023-03-14 | None |
| Safari | Supported | 15.2 | 2021-12-13 | None |
| Safari on iPhone | Supported | 15.2 | 2021-12-13 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 109 | 2023-01-10 | None |
| Samsung Internet | Supported | 21.0 | 2023-05-19 | None |
How a site asks for it
| API | await navigator.storage.getDirectory(); createSyncAccessHandle() in a worker |
| Browser compat keys | api.StorageManager.getDirectoryapi.FileSystemSyncAccessHandle |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Persists until site data is cleared; best effort eviction until persist() is granted |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same origin; storage partitioned by top level site in third party frames |
Typical flow
- Page calls navigator.storage.getDirectory()
- Browser returns the root handle
- Page creates files and opens sync handles in a worker
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Not visible in the person's file manager; cannot exchange files with the OS without pickers or downloads
- Sync access handles only in dedicated workers (Chrome 102, Safari 15.2, Firefox 111)
- Quota: Chrome up to about 60 percent of disk per origin; Firefox up to about 10 percent of disk (max 10 GiB per group, more with persist()); Safari about 60 percent in browser (docs, approximate)
- navigator.storage.estimate() returns usage and quota (disk size hint; padded for privacy in Chrome)
- Support: Chrome 86, Safari 15.2, Firefox 111; Safari write support through createWritable arrived in Safari 26 per BCD
The story
What it is
Gives a site its own private, fast file area inside the browser, with no prompt.
For you
You never see this area and never get asked. It is a private shelf the site uses to keep big files and databases. It is why some web apps open fast on the second visit.
For makers
It gives web apps fast, real file access without a prompt. That makes serious tools possible, such as databases and editors in the browser. It counts toward your storage quota.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A browser game keeps its large levels and save files here so loading is fast. | None named |
| creative | A web photo or video editor keeps its working files here so edits are quick. | Photopea |
| developer | A web database like SQLite runs in the browser and stores its data here. | SQLite Wasm |
| productivity | A note app keeps a full offline copy of your notes in this space. | None named |
| video | A video tool keeps a big clip here while you edit it. | None named |
| security | A malicious site could fill this space with junk. Browsers limit the size. | None named |
| ads | A tracking script could keep a hidden ID file here that cookie clearing may not remove. | None named |
Risks
- Hidden storage
- Can persist an ID
What the platform says
- web.dev: Origin Private File System. Google pitches it as fast file storage inside the browser, used for databases, editors and large files.
- MDN: Origin private file system. Documents the private file area each site gets that is not visible to the user.
Good uses and abuse
Legitimate uses
- SQLite and Wasm databases
- Video editors
- Offline first apps
Known abuse
- Hiding large data on the device
- Persistent tracking storage that survives cookie clearing
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
History
- 2020-10, Chrome 86: OPFS getDirectory ships
- 2021-12, Safari 15.2: OPFS ships in Safari
- 2023-03, Firefox 111: OPFS ships in Firefox
Related capabilities
Related
- File System Access: open and save pickers. Can open files you pick and save changes back to them, in Chrome and Edge
- Storage quotas and eviction. Can store only what your browser allows, and may lose it when space is low
Sources
How well checked: Based on official documentation.