# CodeMirror

> Extensible code editor component for the web

Source: https://talira.ai/catalog/codemirror-xq0nfkkw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / editors / code](https://talira.ai/categories/libraries/editors/code), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Platforms: web
- Licence: MIT
- Pricing: Free and open source
- Pricing notes: Free under MIT; the site says commercial users have a social (but no legal) expectation to help fund maintenance.
- Free tier: yes
- Self-hostable: yes
- Plugins: yes
- Backed by: [Marijn Haverbeke](https://talira.ai/orgs/marijn-haverbeke.md)
- Creator: Marijn Haverbeke, who also maintains ProseMirror and Lezer
- Funding: funded by donations[^1][^2]
- Sponsors: Holmusk, Obsidian, Repl.it, Sourcegraph, Cargo, CodePen, Desmos, Labware, Overleaf

CodeMirror is a code editor component for the web, built from small modules: a state package, a view, and separate packages for languages, autocompletion, search, linting, folding, collaborative editing and merge views. Language support comes from full parsers built with Lezer, CodeMirror's own parser system, with legacy modes for many other languages. It handles accessibility, mobile, bidirectional text and multiple selections, and everything else is added through its extension interface. Version 6 is the current version; CodeMirror 5 is the older, separate release still documented at codemirror.net/5/.

## Links

- Website: https://codemirror.net
- Docs: https://codemirror.net/docs/

## Problems it solves

- add a code editor with syntax highlighting to my web app instead of a plain textarea
- let users edit HTML and CSS templates in the browser with autocomplete
- show lint errors inline while someone types code in my app
- a code editor that still works properly on phones and with screen readers
- Monaco is too heavy to load just to edit a small snippet
- two people editing the same code at once in the browser
- show a side-by-side diff of two versions of a file in a web page
- add syntax highlighting for my own template language
- code folding, bracket matching and search and replace in an embedded editor
- my textarea code input loses indentation and has no line numbers
- theme an in-browser editor to match my app's dark mode

## Features

- syntax highlighting
- line numbers
- autocompletion
- code folding
- search and replace
- linting
- bracket closing
- multiple selections
- undo history
- collaborative editing
- merge view
- theming
- accessibility
- mobile support
- bidirectional text
- internationalization
- language packages for HTML, CSS, Sass, JavaScript, JSON, Markdown and more

## Capabilities

- Takes plugins: plan not known

## Trust

Overall: 0.82 out of 1.
Signals: maintenance 1.00, adoption 1.00, backing 0.90, extensibility 0.20.

- latest package release 11 days ago (npm @codemirror/lint 6.9.8)
- packages released for 14 years
- 940.3M package downloads a month (npm)
- backed by Marijn Haverbeke
- created by Marijn Haverbeke, who also maintains ProseMirror and Lezer
- funding: funded by donations
- sponsored by Holmusk, Obsidian, Repl.it, Sourcegraph
- has a plugin system

## Alternatives

- [Ace](https://talira.ai/catalog/ace-4j7z2qc7.md): An embeddable code editor written in JavaScript

## Sources

[^1]: https://marijnhaverbeke.nl/fund/ (checked 20 Nov 2026)
[^2]: https://codemirror.net/ (checked 20 Nov 2026)
