Privacy and data
What Margin stores, where it is kept, what is sent elsewhere, and how to delete it.
Margin is built so that most of what you do never leaves your device. This page explains exactly what is stored, where, and when anything is sent elsewhere.
Reading and searching notes#
Notes are compiled into the app when it is built, so reading them makes no requests that reveal what you are studying beyond loading the page itself. The search index is downloaded once and searched entirely in your browser.
When you type a query of two or more words in the command palette, Margin may also run a semantic search on the server to suggest related notes, shown under Related. Only the query text is sent. The server turns it into an embedding with Cloudflare Workers AI and compares it with the notes; it does not save the query. If semantic search is not set up, the palette shows only the in-browser results.
Your study data#
| Where | What |
|---|---|
| Your browser (always) | Workspace layout and open tabs, grapher expressions in open graph tabs, the sidebar's course and expanded units, theme, recently opened notes |
| Your browser (as a guest) | Cheat sheet, flashcards and reviews, notes marked as studied, confidence ratings and study activity, exam dates and planner tasks, my notes |
| Your account (when signed in) | The same study data, stored in a Cloudflare D1 database and tied to your account ID |
Study activity is a simple log that powers the Progress charts: which note you opened (at most once per note per day), when you marked it studied, and when you changed its confidence.
Margin does not include advertising or third-party analytics scripts.
Accounts#
Sign-in is provided by Clerk. Clerk stores your account details, such as your email address and name, and tells Margin who you are when you make a request. If you sign in with Google, Google tells Clerk your name and verified email; if you use an email code, Clerk emails the code to you. Margin stores your study data against the account ID Clerk provides, and every request to read, save or delete your data is checked against that ID. See Accounts and sync.
Your profile#
Onboarding saves your role (student or teacher), your year, the courses you chose and, for teachers, the school and subjects you entered. Margin uses them only to put your courses first. Signed in, they are stored with your account; as a guest, in your browser. Change them any time from Your year and courses in the sidebar's … menu.
AI features#
Margin has no AI features switched on at the moment, so nothing you write in it is sent to an AI provider. The only AI model it uses is the one behind semantic search, described above, which receives only your search query.
Deleting your data#
- Single items. Deleting a card, deck, one of your notes, a planner task, an exam or a cheat sheet item removes it immediately, from your account too if you are signed in.
- Progress. Unmarking a note as studied returns it to New and removes that day's activity for it. Activity from earlier days stays in the log.
- All your notes. Delete all my notes in Settings removes everything in My notes at once.
- Guest data. Clear this device in Settings removes your study data from that browser. Clearing your browser's site data for Margin also removes your layout and recent notes.
- Signing out does not delete anything. Your synced data stays in your account until you delete it.
- Your account. Delete account in Settings permanently deletes your sign-in account and everything Margin stores for it: notes, flashcards and reviews, progress and activity, plans and exams, past-paper progress, your profile and any homework packs you made.
Export my data in Settings downloads everything Margin holds for you as one JSON file. Deleting a single deck keeps the review history of its cards until you delete your account.
Running your own copy#
If you deploy Margin yourself, you are the operator: your own Cloudflare account holds the database and runs semantic search, and your own Clerk application holds the accounts. See Deploying to Cloudflare.