
Prism
Lightweight, extensible JavaScript syntax highlighter for code blocks in web pages, which can also run in Node.js.
Prism is a JavaScript syntax highlighter for code shown in web pages. A page includes its CSS and JavaScript files, or loads them from a CDN, and Prism highlights the code elements that carry a language class. It can also be installed from npm for use with a bundler, and it can be used with Node.js.
Worth knowing
The homepage lists two limitations: Prism is regex-based, so it fails on certain edge cases, and any pre-existing HTML inside the code is stripped off. The README says the maintainers accept only security-relevant pull requests for the time being while they work on a new major version.
Identity
Rendering and deploy
- Install with
- npm, script tag, download1
Releases
Adoption
Sources
- 2026-11-16: links, Categories, Runtime, Install with
prismjs.com - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/PrismJS/prism - 2026-11-16: Maintainer, License, License model
github.com/PrismJS/prism/blob/v2/LICENSE - 2026-11-16: First release
api.github.com/repos/PrismJS/prism/tags - 2026-11-16: Current major version, Last release
api.github.com/repos/PrismJS/prism/releases - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/prismjs - 2026-11-16: Contributors
api.github.com/repos/PrismJS/prism/contributors?per_page=1 - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/prismjs