# Prism

Lightweight, robust, elegant syntax highlighting.

Repository: https://github.com/PrismJS/prism
Canonical: https://ross.abutalabs.com/products/prism
Homepage: https://prismjs.com
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-06-29T15:55:31+00:00
Link (homepage): https://prismjs.com
Link (site_page): https://prismjs.com/faq
Link (site_page): https://prismjs.com/docs/prism
Link (site_page): https://prismjs.com/plugins/wpd
Link (site_page): https://prismjs.com/extending

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 8, longevity 100
- inputs: {"age_days": 5167, "days_push": 65, "days_rel": 541, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 13038, forks 1384 (observed 2026-08-28T04:11:01.790214+00:00)

## What it is
Prism is a lightweight, extensible JavaScript syntax highlighting library for highlighting code in web pages, with a 2KB core and hundreds of regex-based language definitions plus a plugin architecture and theme collection. It is used on millions of websites and is currently in maintenance mode while Prism v2 is developed.

## Use cases
- highlight code snippets on a blog or documentation site
- add syntax highlighting to a static site with a tiny footprint
- define custom language grammars for a DSL
- style code blocks with CSS themes
- highlight code server-side in Node.js
- build a markdown or docs pipeline that renders colored code blocks

## When to choose
- you need a tiny, fast, browser-based highlighter with easy CSS theming
- you want to support many languages via community definitions
- you need to extend highlighting with regex-based custom grammars or plugins

## When to avoid
- you need a full, error-free parser for IDE-grade highlighting (e.g. tree-sitter or language servers)
- you need active feature development right now, since only security PRs are accepted pending v2
- you need highlighting outside HTML/browser contexts with rich editor integration

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, ui-components, frontend-framework
- domain: web-development, frontend, documentation, developer-tools
- platform: browser
- tags: syntax-highlighting, code-highlighting, regex-based-tokenizer, themes, extensible-plugins, nodejs, web-server

## Member repositories
- PrismJS/prism (main) score 63
- PrismJS/prism-themes (plugin) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:01.790214+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:13:34.708911+00:00, confidence not recorded.
  - readme: https://github.com/PrismJS/prism (fetched 2026-08-28T04:11:01.790214+00:00, sha 4bd7c09e3c35)
  - homepage: https://prismjs.com (fetched 2026-08-29T08:09:38.571704+00:00, sha 0cc0e16db8ae)
  - site_page: https://prismjs.com/docs/prism (fetched 2026-08-29T08:09:38.701718+00:00, sha aadbdcabf624)
  - site_page: https://prismjs.com/faq (fetched 2026-08-29T08:09:38.638070+00:00, sha 412057ec399f)
  - site_page: https://prismjs.com/plugins/wpd (fetched 2026-08-29T08:09:38.738940+00:00, sha 037f62275d95)
  - site_page: https://prismjs.com/extending (fetched 2026-08-29T08:09:38.781900+00:00, sha d2f0b23186fd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
