If you search "Grammarly alternative," you get listicles full of freemium tools that are just smaller subscriptions. What I actually wanted was simpler: grammar checking in every text field of my browser, without a subscription and without my text being routed through a company's servers.
I went through the open-source options first. Here's the honest rundown — and then the tool I ended up building, which is also free and open source.
The open-source landscape, honestly
LanguageTool — the most mature open-source grammar checker (the core is open source and self-hostable via Docker). Rule-based, supports 40+ languages, solid browser extension. The catch: the hosted extension most people install is freemium with premium rules paywalled, and rule-based checking misses things an LLM catches easily — run-on sentences, agreement across clauses, awkward phrasing. Self-hosting fixes the privacy question but means running a Java server.
Harper — a modern grammar engine in Rust, compiled to WASM, running fully locally. Genuinely private (nothing leaves your machine) and fast. The trade-off is the flip side of being local and rule-based: English-focused, and it won't judge whether your whole sentence makes sense the way an LLM does.
Vale — not really a Grammarly alternative; it's a style linter for docs-as-code (enforcing style guides in CI). Great at what it does, different problem.
So the field splits into two camps: rule-based and private (Harper, self-hosted LanguageTool) or LLM-smart but subscription-and-server-based (Grammarly, QuillBot). I wanted the third quadrant: LLM-smart and private and free.
The trick that makes the third quadrant possible
The insight behind GemType is almost embarrassingly simple: Google's Gemini API has a genuinely usable free tier, and modern flash-tier models are more than good enough for grammar work. So instead of running a paid middleman server between the user and the model, the extension talks directly from the browser to Google's API using the user's own free key.
That single architectural decision cascades into everything people actually want:
- Free — the user's free-tier key covers daily writing comfortably
- Private — there is no vendor server; I never see anyone's text or key
- Auditable — no backend means the entire data path is in the extension source
- Any language — the model checks whatever language you write in, auto-detected
The parts that were actually hard to build
The LLM plumbing is the easy 10%. The hard 90% is the same thing that makes Grammarly's engineering interesting:
1. Underlines without touching the page's DOM. If you wrap flagged words in <span>s inside a React/ProseMirror editor, you corrupt its internal state (Grammarly abandoned exactly this approach years ago). GemType draws wavy underlines on a transparent overlay in a shadow root, positioned via Range.getClientRects() for rich editors and a hidden mirror element for plain <textarea>s.
2. Snippets, not offsets. LLMs are unreliable at reporting character offsets. Instead, Gemini returns structured JSON (responseSchema) with the exact erroneous snippet and its correction; the client locates snippets with substring search and re-anchors them live as you type.
3. Undo-safe fixes. Corrections are applied with document.execCommand('insertText'), which preserves the native undo stack and fires real input events — so frameworks treat the fix as a user edit.
4. Sentence re-checks. After every accepted fix, the surrounding sentence is automatically re-checked (scoped to that sentence, not the document — token-frugal). Word-level fixes stop leaving broken sentences behind.
5. The bug I'll remember: on Reddit everything worked — invisibly. Reddit ships CSS that hides unknown custom elements (visibility:hidden), which nuked my overlay host. Fix: every host style set inline with !important.
It's all vanilla JavaScript, Manifest V3, no build step. If you're building an extension that has to coexist with hostile editors, the source may save you some scars: github.com/riponcm/GemType.
Where each tool actually fits
| Tool | Engine | Privacy | Languages | Cost |
|---|---|---|---|---|
| LanguageTool (self-hosted) | Rules | Local | 40+ | Free + your server |
| Harper | Rules (Rust/WASM) | Fully local | English-focused | Free |
| Vale | Style rules | Local/CI | n/a (style) | Free |
| Grammarly / QuillBot | LLM + rules | Vendor servers | English + few | Freemium → $12–30/mo |
| GemType | LLM (Gemini) | Direct to Google with your key; no vendor server | Any, auto-detected | Free (your free-tier key) |
Honest trade-offs of GemType: you spend two clicks getting a free API key from Google AI Studio (no card), you need an internet connection, and Google Docs isn't supported (it renders to canvas and gates its annotation API to whitelisted vendors — the one place only Grammarly-tier companies can go).
Try it
- Website / live demo: gemtype.matily.org
- Chrome: Chrome Web Store
- Edge: Edge Add-ons
- Firefox: Firefox Add-ons
- Source (Apache-2.0): github.com/riponcm/GemType
- 2-minute tutorial:
One more thing that only an open-source tool can offer: don't trust my privacy claims — paste the repo into ChatGPT/Claude/Gemini and ask it to audit where your text and key are sent. The answer should be "generativelanguage.googleapis.com and nowhere else."
It's a solo project under my studio, Matily. Issues and PRs welcome — editor-compatibility reports are gold. And if it's useful, a GitHub star genuinely helps people find it.
Disclosure: I'm the author of GemType. It's an independent project, not affiliated with or endorsed by Grammarly, QuillBot, LanguageTool, or Google. "Grammarly" is a trademark of Grammarly, Inc.
Top comments (0)