Skip to content
Agents tracked: 378 Downloads (7d): 244M down 5.7% GitHub stars: 8.4M VS Code installs: 151M Releases (7d): 407 Agent status: 1 with issues Updated Oct 10, 2026

highlight.js

Syntax highlighting library with automatic language detection for code blocks.

Markdown, editors and content npm BSD-3-Clause

Used in agent projects
68
0.5% of 12,697 public repos built with AI coding agents
Rank in markdown, editors and content
#12 of 46
by use in those projects
Downloads
38.6M
npm, last 7 days, highlight.js
GitHub stars
25K
last push Sep 6, 2026

How highlight.js is used

highlight.js is a dependency in 68 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (0.5%), #12 of 46 in markdown, editors and content. The most used alternative there is react-markdown. Projects that use it most often also use TypeScript (91.2%), Tailwind CSS (69.1%), ESLint (72.1%).

Often used with highlight.js

TypeScript91.2% of highlight.js projects · 1.6× more than average
Tailwind CSS69.1% of highlight.js projects · 2.0× more than average
ESLint72.1% of highlight.js projects · 1.9× more than average
react-markdown33.8% of highlight.js projects · 11.9× more than average
Marked33.8% of highlight.js projects · 29.0× more than average
React70.6% of highlight.js projects · 1.6× more than average
rehype-highlight27.9% of highlight.js projects · 91.0× more than average
remark-gfm27.9% of highlight.js projects · 12.3× more than average

By coding agent

Claude Code1.0% of projects set up for it
GitHub Copilot0.9% of projects set up for it
Cursor0.9% of projects set up for it
Gemini CLI1.4% of projects set up for it
OpenCode1.6% of projects set up for it

Share of public repos configured for each agent that list highlight.js as a dependency.

Install

Packagenpm install highlight.js
Main stacksTypeScript / JavaScript (34), Next.js (25), PHP (6), Python (2)
Example projectsChenyCHENYU/Robot_Admin, trypostit/trypost, miantiao-me/bm.md, Hyk260/PureChat, cdavid817/vanehub-ai

Alternatives to highlight.js

All markdown, editors and content

Tool Used in agent projectsDownloads / wk GitHub starsLicense
react-markdown npm
React component for rendering markdown with customizable component handling.
360 (2.8%) 37.2M 15.9K MIT
remark-gfm npm
Remark plugin adding GitHub Flavored Markdown support for tables and strikethrough.
288 (2.3%) 44.5M 1,249 MIT
Jinja2 pypi
Fast and expressive template engine for Python with powerful flexibility.
175 (1.4%) 145M 11.8K —
Marked npm
Fast, efficient markdown parser for converting markdown to HTML.
148 (1.2%) 83.8M 37.2K MIT
React Syntax Highlighter npm
React component for syntax highlighting code with Prism.js or Highlight.js.
110 (0.9%) 7.8M 4,674 MIT
gray-matter npm
Parser extracting YAML/JSON front matter from markdown and text files.
106 (0.8%) 10.6M 4,490 MIT
Tiptap npm
Headless Vue/React rich text editor framework with customizable extensions.
105 (0.8%) 18.7M 38.7K MIT
Pygments pypi
Syntax highlighting library for code in Python supporting hundreds of programming languages.
97 (0.8%) 239M 2,213 —
Is highlight.js right for your project? Ask AgentGid →