About Microsoft Clarity
Clarity is a behavioral analytics library written in TypeScript with two main goals: privacy and performance. It watches DOM mutations and user interactions in the browser to generate aggregated insights about how visitors view and use a website, across modern devices and browsers. It is released under the MIT license.
The data it captures supports session replay and heatmaps, which help product and design teams see where features succeed or fail. The README says the same code powers Microsoft's hosted behavioral analytics service at clarity.microsoft.com, where a live demo is also available, so the repository represents the client-side collection library rather than a full self-contained analytics backend.
The community is invited to help build a privacy-first, high-performance behavioral analytics library. It suits web teams who want to understand user behavior, improve conversion and retention, and review the code that runs on their pages before adding it to a site.
Key features
- Session replay from DOM mutations
- Heatmaps of user interaction
- Aggregated behavioral insights
- Privacy and performance focus
- Works across modern browsers and devices
- Same code as Microsoft's hosted service
Good fit for
- →Finding usability problems in web apps
- →Auditing the tracking script before deploying it
- Built with
- TypeScript
- Tags
- session-replay
- heatmaps
- analytics
- behavioral-analytics
- privacy
- typescript
- ux
- microsoft
Microsoft Clarity: questions and answers
- What is Microsoft Clarity used for?
- Microsoft Clarity is an open-source behavioral analytics library that records DOM changes and interactions to produce session replay and heatmap insights. It is a good fit for finding usability problems in web apps and auditing the tracking script before deploying it.
- Is Microsoft Clarity open source?
- Yes. Microsoft Clarity is open source under the MIT licence. Its source code is on GitHub at microsoft/clarity and is written mainly in TypeScript.
- Is Microsoft Clarity free?
- Yes. Microsoft Clarity is open source, so the software itself is free to use. A managed cloud version is also available.
- Can I self-host Microsoft Clarity?
- Yes. Microsoft Clarity can be self-hosted on your own server or infrastructure.
- What is Microsoft Clarity an alternative to?
- Microsoft Clarity is an open-source alternative to Hotjar, Crazy Egg, Mouseflow and Lucky Orange. Other open-source alternatives to Hotjar include OpenReplay, PostHog and Talivia.
- Is Microsoft Clarity actively maintained?
- Yes. The most recent commit to Microsoft Clarity was on 1 October 2026. The project has 2.7k stars on GitHub.
Open-source alternatives to Microsoft Clarity
See all
OpenReplay
Session Replay
Session replay, cobrowsing and product analytics you can self-host. Best for reproducing i
OSSvs Hotjar★ 13k
PostHog
Analytics
PostHog automatically diagnoses problems, fixes bugs, and generates pull requests – all wi
OSSvs Mixpanel★ 40k
Talivia
Analytics
Open-source, self-hosted revenue-first analytics for founders: web analytics, Session Repl
MITvs Google Analytics★ 2.4k
OpenPanel
Analytics
OpenPanel is an open-source web and product analytics platform, an open-source alternative
AGPL-3.0vs Mixpanel★ 7.1k
Swetrix
Analytics
📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative w
AGPL-3.0vs Google Analytics★ 1.2k
Highlight.io
Monitoring & Observability
Highlight gives your team full transparency into the errors, interactions, and performance
OSSvs Sentry★ 9.4k
SaaS alternatives to Microsoft Clarity
See all
Hotjar
Session Replay
Hotjar is a website experience analytics tool with heatmaps, session recordings and feedback surveys, now part of Contentsquare.
SaaS
Crazy Egg
Session Replay
Heatmaps, recordings, surveys and A/B tests for improving website conversions
SaaS
Mouseflow
Session Replay
Session replay, heatmaps and funnels for understanding visitor behavior
SaaS
Lucky Orange
Session Replay
Heatmaps, session recordings and live chat for website conversion analysis
SaaS
FullStory
Session Replay
Digital experience analytics with session replay, heatmaps and funnels
SaaS
Contentsquare
Analytics
Digital experience analytics with journey analysis, heatmaps and session replay
SaaS

