harper
Harper is a fast, privacy-first English grammar and style checker written in Rust. It runs entirely locally (including in the browser via WebAssembly), linting documents in milliseconds with a tiny memory footprint, and integrates with editors through a language server (harper-ls) and a JavaScript library (harper.js).
Apache-2.0Permissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
4/5- Actively maintainedCommits in the last 6 months
- No known vulnerabilitiesNot yet scanned
- Clear, usable licenseApache-2.0 (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
cargo add harperOur analysis
Harper is an offline English grammar and style checker built in Rust, designed as a lightweight, private alternative to cloud services like Grammarly. It ships as a language server, a WASM-powered JS library, and editor plugins.
When to use harper
Use Harper when you want grammar/spell/style checking that runs locally with no data leaving your machine, near-instant linting, and a small memory footprint — ideal for editor integrations (VS Code, Neovim, Helix, Emacs, Zed, Obsidian) or embedding in web apps via WebAssembly.
When not to
Choose a different tool if you need non-English languages, deep n-gram or LLM-grade contextual rewriting and tone suggestions (LanguageTool's full dataset or Grammarly), or highly configurable enterprise prose/style governance where Vale's customizable rule packs shine.
Strengths
- Extremely fast linting (milliseconds) and very low memory use compared to LanguageTool
- Fully local and privacy-preserving — no network round-trips
- Runs in the browser via WebAssembly and embeds easily through harper.js
- First-class editor support via an LSP server (harper-ls) covering many editors
- Backed by Automattic with an active contributor community
Trade-offs
- English-only at present; other languages require future contributions
- Rule-based rather than LLM-driven, so suggestions can be less contextually nuanced than cloud tools
- Smaller dataset than LanguageTool's full n-gram model may miss some subtle errors
- Less mature/configurable rule customization than dedicated style linters like Vale
Maturity
Actively developed and well-starred (10k+ stars) under Automattic's stewardship, with documented integrations, a Discord community, and multiple distribution channels (LSP, WASM, editor plugins), indicating solid production momentum for an English-focused checker.
Harper is an English grammar checker designed to be just right. I created it after years of dealing with the shortcomings of the competition.
Grammarly was too expensive and too overbearing. Its suggestions lacked context, and were often just plain wrong. Not to mention: it's a privacy nightmare. Everything you write with Grammarly is sent to their servers. Their privacy policy claims they don't sell the data, but that doesn't mean they don't use it to train large language models and god knows what else. Not only that, but the round-trip-time of the network request makes revising your work all the more tedious.
LanguageTool is great, if you have gigabytes of RAM to spare and are willing to download the ~16GB n-gram dataset. Besides the memory requirements, I found LanguageTool too slow: it would take several seconds to lint even a moderate-size document.
That's why I created Harper: it is the grammar checker that fits my needs. Not only does it take milliseconds to lint a document, take less than 1/50th of LanguageTool's memory footprint, but it is also completely private.
Harper is even small enough to load via WebAssembly.
Language Support
Harper currently only supports English, but the core is extensible to support other languages, so we welcome contributions that allow for other language support.
Performance Issues
We consider long lint times bugs. If you encounter any significant performance issues, please create an issue on the topic.
If you find a fix to any performance issue, we would appreciate the contribution. Just please make sure to read our contribution guidelines first.
Links
Supported Editors' Documentation
Huge Thanks
This project would not be possible without the hard work from those who contribute.
Harper's logo was designed by Lukas Werner.