7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Microsoft Clarity

Open source

Open-source behavioral analytics library that records DOM changes and interactions to produce session replay and heatmap insights.

clarity.microsoft.com
Microsoft Clarity homepage screenshot
GitHub stars
2.7k
Last commit
yesterday
Repository age
6 years
Licence
MIT
Self-hosted
Yes

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

SaaS alternatives to Microsoft Clarity

See all