Margin BILINGUAL NOTES

Privacy-first · Bilingual · Open source · MIT

Read the web in two languages, without losing the original.

Margin inserts the translation beneath each paragraph. The original stays exactly where it was. Bring your own API key — OpenAI, Anthropic, or Google. No Margin server, no account, no telemetry.

Install from source unpacked · MV3
Privacy-first 隱私優先 Bring Your Own Key 自帶 API Key No telemetry 不追蹤 Open Source · MIT 開源 MIT Chrome MV3 OpenAI · Claude · Gemini

01See for yourself

The original stays. The translation grows beneath.

Most translation extensions replace the page. You scroll, you read, and somewhere along the way you forget which language you started in. Margin does the opposite — the translation slides in beneath, paragraph by paragraph.

arxiv.org/abs/2401.04088

Mixture of Experts: A Practical Survey for Long-Context Language Models

Most translation extensions replace the page. You scroll, you read, and somewhere along the way you forget which language you started in. Margin does the opposite: the original text stays exactly where it was, and the translation slides in beneath, paragraph by paragraph.

This matters more than it sounds. When the original is one glance away, you can verify a translated phrase the moment it feels off. The bilingual layout turns reading into a quiet collaboration between two languages instead of a one-way conversion.

There is no Margin server. The extension talks directly to OpenAI, Anthropic, or Google with the API key you provide. Your reading is yours. Your bill is yours. Your choice of model is yours.

Margin detects readable blocks—paragraphs, headings, list items, blockquotes—and skips the chrome: navigation, forms, code, hidden text. On X and longform articles, a dedicated detector targets the post body and ignores profile names and metric counts.

02Features

Every detail is shaped so you never lose the original.

Margin started from one question: when do you most need the original while reading? The answer is, always. So the original is always there.

F.01

Bilingual stacked layout

Translations don't replace originals — they appear right beneath them. Compare, verify, and learn without losing your place.

F.02

Smart text detection

Detects paragraphs, headings, lists, and blockquotes. Skips nav, forms, buttons, code, and hidden text. Even handles legacy table/font/br pages.

F.03

Bring your own AI

Supports OpenAI, Anthropic Claude, and Google Gemini. Endpoint is editable — works with compatible gateways and self-hosted routing.

F.04

Privacy first

No Margin server, no account, no default telemetry. Your API key lives in your browser. Provider requests come straight from the service worker.

F.05

X / Twitter optimization

A dedicated detector for timeline cards and longform articles. Translates the post body, skips profile names, counts, and media controls.

F.06

Cache, your way

Three modes: persistent, session, off. Don't pay twice for the same paragraph — or leave no trace at all.

03Supported AI providers

Three frontier models, one is yours.

Margin is not bound to a single provider. The endpoint field is editable for compatible gateways and self-hosted routing. "Fetch models" reads available models directly from the provider.

OpenAI

GPT-4o · GPT-4 · GPT-3.5

Stable, broad model selection, mature ecosystem. Margin streams via chat completions and can fetch your account's available models from the options page.

https://api.openai.com/v1/chat/completions

Anthropic Claude

Claude Opus · Sonnet · Haiku

Strong on long passages and tone preservation. Often shines on research articles and reportage where nuance matters.

https://api.anthropic.com/v1/messages

Google Gemini

Gemini 1.5 · 2.0 Flash · Pro

Generous free tier, strong East Asian languages, low-latency Flash variants — ideal when translating large amounts of text continuously.

https://generativelanguage.googleapis.com/v1beta/models

04Why BYO key

What you read, no one needs to know.

Most cloud translation tools quietly send every paragraph you read to a third-party server, where it may be stored, analyzed, or used for training. Margin sidesteps that whole class of risk by not having a server at all.

  • P.01

    No Margin server

    All provider requests come directly from the extension's service worker. There's no us in the middle, and no proxy layer.

  • P.02

    No login, no account

    No signup flow, no OAuth, no cloud sync. Your browser profile is your "account."

  • P.03

    No telemetry by default

    No analytics, no error reporting, no usage events. Debug info shows up only in the popup's debug mode, locally.

  • P.04

    Only selected text segments

    Margin never sends full page HTML to the provider — only detected readable blocks, batched to keep latency low.

  • P.05

    API key stays in your browser

    Stored in chrome.storage and never leaves your profile. Treat your browser profile as your trust boundary.

05Two display styles

Blend into the page, or stand right out. You pick.

The same translation can quietly merge into the layout — or be highlighted like a stripe of jam. Whichever fits your reading mode.

— STYLE A · INTEGRATED

Blends into the flow

Most translation extensions replace the page. Margin does the opposite.
大多數翻譯外掛會把整頁取代。Margin 反其道而行。

Translation appears in a soft tonal shift with a thin accent rule. Best for long, immersive reading — like the back of the same page.

— STYLE B · HIGHLIGHTED

Buttered highlight

Most translation extensions replace the page. Margin does the opposite.
大多數翻譯外掛會把整頁取代。Margin 反其道而行。

Translation sits on a buttered margin block. Best for language learning, side-by-side comparison, or finding translations fast in dense layouts.

06X (Twitter) optimization

In a flood of posts, translate only what's worth reading.

Timelines aren't articles. Margin ships an X-specific detector that targets tweet bodies and longform articles only — skipping profile names, like and view counts, media controls, and posts X already marks as translated.

Mari Yamada@mariyamada
2:14 PM · May 8, 2026
After ten years of duct-taping a legacy browser extension in the lab, I've finally decided to rewrite it from scratch. The hard part isn't the code — it's the negotiation with the version of myself who shipped it.
在研究室用了十年的老瀏覽器外掛,終於決定自己重寫一遍。難的不是寫程式,是跟過去的自己談判。
@mariyamada · 142 ❤ · 38 ↻ · Margin won't translate any of these
  • Translates tweetText only — not display names
  • Skips like, repost, and view counts
  • Detects the body of long-form X articles
  • Quoted posts disabled by default; opt-in from options
  • Skips posts X already marks as translated
  • Picks up newly-loaded cards as you scroll

07Tech · Open source

Every slice shows its grain.

Margin is built in TypeScript on Manifest V3 and bundled with Rolldown. MIT-licensed; the source is public.

// src/content/detect.ts
export const detectReadableBlocks = (root: Document) => {
  return walker(root)
    .filter(isReadableTag)
    .filter(notInsideChrome)
    .filter(hasMeaningfulText);
};

// skip nav / form / button / code / hidden
// keep p / h1-6 / li / blockquote / article
// handle legacy: table, font, br-separated
86.6%
TypeScript
MV3
Manifest V3
MIT
License
0
Telemetry calls

"No license has been selected yet." Actually, it's MIT.

Margin is an open-source MVP. Issues, PRs, forks, and self-hosting are welcome. We believe privacy you can verify is the only privacy worth claiming — so the source is public.

Want to contribute? The docs are there: Product Requirements, Principles, Threat Model, Roadmap. Start in docs/.

github.com/withmargin/margin-read

08Honestly

Margin is still an early MVP.

It works well on article pages, legacy text-heavy pages, and a few high-value dynamic pages like X. But there are rough edges, and we're listing them here instead of hiding them.

L.01

Firefox isn't a primary target yet

Chrome / Chromium first. Firefox will follow.

L.02

Some highly dynamic apps

On SPAs that aggressively rewrite the DOM, translation blocks may get moved or removed. Working on it.

L.03

Large pages translate in batches

To stay friendly with provider rate limits, translations appear progressively rather than all at once.

09Bring your own cost

Margin is free. Your API bill is yours.

There is no Margin subscription. The only cost is the provider's per-token rate, paid directly to OpenAI, Anthropic, or Google. Most reading sessions are measured in cents.

Cost estimator · monthly

Pages translated / day 10
Avg. words / page 1,200
Model GPT-4o mini
$0.07
per day
$2.16
per month
  • $.01
    A typical research paper (≈10k words) translated end-to-end with GPT-4o mini comes in under one cent.
  • $.00
    Cached pages cost zero. Margin's persistent cache means re-reading a translated page never re-bills you.
  • B Y O
    Bring your own key. The endpoint is editable — plug in any compatible gateway, self-hosted router, or routed proxy.
  • FREE
    Gemini's free tier is generous enough for casual reading. Most users never see a bill at all.

10Frequently asked

Questions, before you install.

A short list. Longer answers live in the docs/ directory of the repository.

Q.01 Why bring your own API key? +
Cloud translation services route every paragraph you read through their servers, where it can be logged, analyzed, or used for training. With BYO-key, your reading is sent only to the provider you already chose to trust. Margin itself sees nothing.
Q.02 How is this different from Google Translate or DeepL? +
Most extensions replace the page with a translated copy. Margin keeps the original and inserts the translation beneath. The bilingual layout is the point: it is a reading tool for people who do not want to leave the source language behind.
Q.03 Which AI provider should I pick? +
For long-form English-to-Chinese with tone preservation, Claude is usually a safe default. For the lowest cost and broad model selection, GPT-4o mini. For a generous free tier and East Asian languages, Gemini Flash. The endpoint field accepts any OpenAI-compatible gateway.
Q.04 Will my API key leak? +
The key lives in chrome.storage on your profile. Provider requests are issued from the extension service worker. There is no Margin server in the path. Treat your browser profile as your trust boundary — standard advice for any extension that holds credentials.
Q.05 Does it work on PDFs? +
Not yet. Margin targets HTML pages today. PDF support is on the roadmap; in the meantime, paste the text into a plain HTML reader, or use a browser PDF-to-HTML viewer.
Q.06 Why is the codebase TypeScript? +
A privacy-claiming extension should be auditable. TypeScript on Manifest V3 with Rolldown gives a small, readable surface area. The repository contains the PRD, principles, threat model, and roadmap so the design choices are checkable, not just the binaries.
Q.07 When will it be on the Chrome Web Store? +
Soon. The MVP is functional today as an unpacked install. Submit your email above to get notified the day it lands. There will be no second mail.