Shiki
A strong pick. 1st of 8 code editors and highlighters.
Shiki is a syntax highlighter. It uses the same TextMate grammars and themes as VS Code to produce highlighted HTML, either at build time or at runtime. It does not edit code. For displaying code today it is the most accurate and the fastest-growing choice, and it is the default highlighter in Astro, VitePress and Nuxt Content.
Best for: Docs sites, blogs, markdown pipelines and AI chat UIs that need VS Code-quality highlighting, ideally rendered on the server or at build time.
Scores
Overall8.5
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
For displaying code it is the best pick today. It is accurate, actively maintained, growing fast and backed by major frameworks. It does not edit code, and it is heavier than Prism for small client-side uses, so it does not cover the whole category.
- npm downloads ratio: Growth of 9.7x against a 4.1 median.
- shiki.style/guide/best-performance: Official advice for keeping client-side cost down.
- basedash.com/blog/how-we-cut-our-client-bundle-from-26-mib-to-18-mib: A user had to cut a 5.1 MiB Shiki chunk from its client bundle.
GPT-6.2 Sol: 8.5, likely 7.4 to 9.4
Shiki is a leading pick for new documentation sites that can render code at build time. Its grammar fidelity, configurable output, active releases, and framework integrations make it a stronger choice for that job than Prism. The recommendation is narrower across the full category because highlight.js is better suited to lightweight browser highlighting with language detection, and Monaco or CodeMirror serves projects that need editing.
- zenn.dev/team_zenn/articles/zenn-prism-to-shiki?locale=en: Production switch from Prism documents the fidelity and customization trade-off.
- github.com/shikijs/shiki/releases/tag/v4.6.0: Current stable release ships fixes and performance improvements.
- docs.astro.build/en/guides/syntax-highlighting: A major framework uses Shiki for static highlighting by default.
- highlightjs.org: highlight.js offers browser delivery and automatic language detection.
- github.com/microsoft/monaco-editor: Monaco provides a full browser editor.
- peers: The category includes both full editors and dedicated highlighters.
Needed by many5.2
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many web developers need to show highlighted code at some point, in docs, blogs, markdown or LLM chat output. Shiki covers only the display half of the category, not editing. It works on any runtime and framework, so within that half it reaches widely.
- github description: Described as a syntax highlighter, not an editor.
- shiki.style/guide/bundles: Has bundles for Node and for the web, so it runs on any runtime.
GPT-6.2 Sol: 5.3, likely 4.2 to 6.5
Shiki serves documentation, tutorials, code previews, and diff viewers across frameworks and runtimes. It covers the display side of the category, and editing requires a separate component. Framework defaults show that the use case is established, but they give little indication of how often JavaScript projects need to display code.
- shiki.style/guide: TextMate highlighting across modern JavaScript runtimes.
- shiki.style/packages/monaco: Shiki supplies highlighting inside a separate editor.
- docs.astro.build/en/guides/syntax-highlighting: Built-in highlighting for Markdown, MDX, and Astro components.
- pierre.computer/writing/on-highlighting-code: Code diff viewer describes its use of Shiki.
Helps a lot8.8
How well does it do the job for those who need it?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
Its TextMate grammars give highlighting as accurate as VS Code's, and an independent comparison calls it the more accurate and more compatible option. Transformers, dual themes and Twoslash make it the richest highlighter around. It is slower at runtime and heavy when the full bundle ships to clients, but static rendering avoids most of that cost.
- tanstack.com/highlight/latest/docs/comparison: Calls Shiki's grammar accuracy much deeper, but finds it slower and its HTML larger.
- shiki.style/guide/bundles: The full bundle is 1.2 MB gzip, and fine-grained imports are advised for the web.
- bsky.app/profile/antfu.me/post/3lvgmhdvl4s2o: The JS engine now supports 100% of the built-in languages.
- dev.to/begin/tale-of-the-tape-highlightjs-vs-shiki-27ce: Independent write-up comparing Shiki with highlight.js.
GPT-6.2 Sol: 8.6, likely 7.5 to 9.5
Version 4.6.0 combines VS Code grammar coverage with typed HTML and token APIs, dual themes, and transformers. Zenn found the markup easier to customize and reported that its AI-assisted migration from Prism was manageable. Prism and highlight.js ran faster in a third-party comparison, and browser performance depends on which engine and grammars are loaded.
- npm latestVersion, hasTypes: Stable version 4.6.0 ships TypeScript declarations.
- shiki.style/guide: TextMate grammars, dual themes, and output customization.
- zenn.dev/team_zenn/articles/zenn-prism-to-shiki?locale=en: Production migration describes easier markup customization and AI assistance.
- github.com/speed-highlight/core#benchmark: A competing highlighter’s benchmark measures slower Shiki startup and throughput.
- shiki.style/guide/best-performance: Documents engine selection, selective imports, and instance reuse.
Holds up over time8.6
Will it still be a good choice in two years?
Claude Opus 5.5: 9.0, likely 8.0 to 9.5
In the last year it shipped 22 releases and 148 commits, and it has 293 contributors. It sits in the Anthony Fu and Nuxt/Vue ecosystem, and major frameworks depend on it. Breaking changes are mild: v4 only dropped Node 18 and removed APIs that were already deprecated.
- github releasesLastYear: 22 releases, the latest on 2026-11-02.
- github contributors: 293 contributors.
- shiki.style/blog/v4: v4 only drops Node 18 and removes APIs that were already deprecated.
GPT-6.2 Sol: 8.1, likely 6.9 to 9.0
Shiki recorded 148 commits and 22 releases in the past year, with fixes from several contributors in 4.6.0. The v4 upgrade dropped Node.js 18 and removed deprecated APIs, and a user reported a TypeScript declaration regression at launch. Repeat tag signatures from one maintainer leave some uncertainty about release access, and the available records give a limited picture of funding and issue turnaround.
- github commitsLastYear, releasesLastYear, contributors, openIssues, openPullRequests: Active release cadence, broad contributor history, and a current backlog.
- github.com/shikijs/shiki/releases: Recent releases show fixes from multiple contributors and repeated tag signing by one maintainer.
- shiki.style/blog/v4: Documents the Node.js support change and API removals.
- github.com/shikijs/shiki/issues/1254: User reported a v4.0 declaration error with library checking enabled.
- opencollective.com/shiki-js: Public funding record shows limited activity.
Used widely7.2
How many use it, and is that growing?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
Downloads grew 9.7x in a year, well above the 4.1 median. Much of that comes through Astro, VitePress, Nuxt Content and AI markdown renderers rather than direct choice. It has 26.6k dependent repos, more than Monaco and CodeMirror but far fewer than Prism and highlight.js, which are much older.
- npm downloadsLast4Weeks: 153.7M now, against 15.8M a year ago, a ratio of 9.7.
- dependents: 26,594 repos and 433 packages.
- peers highlight.js dependentRepos: 700k for highlight.js and 219k for Prism, so older peers have a larger installed base.
GPT-6.2 Sol: 6.9, likely 5.7 to 8.0
Four-week npm downloads rose 9.7 times year over year, well above the 4.1-times catalog median and ahead of Prism and highlight.js. The 26,594 indexed dependent repositories put Shiki ahead of the editors in this bundle and well behind those two highlighters. Astro’s default integration and automated installs inflate the download count as a measure of direct choices, so the growth signal is clearer than the size of Shiki’s direct user base.
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo; medianDownloadsRatio: 153.7 million versus 15.8 million downloads, or 9.7 times year over year.
- dependents repos, packages; peers dependentRepos: 26,594 indexed repositories and 433 packages, with much larger repo counts for Prism and highlight.js.
- github stars; bluesky posts: 13,943 stars and 10 repository-linked posts in the sample.
- docs.astro.build/en/guides/syntax-highlighting: Astro brings Shiki to users through its default Markdown integration.
Vouched for8.1
Who stands behind it being good?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
Astro, VitePress, Nuxt and many docs frameworks build on it, and those teams have a lot to lose if it fails. Independent comparisons confirm its accuracy. Survey data that names it is missing, which keeps the score below the top.
- nuxt.com/blog/shiki-v1: Nuxt documents its adoption of Shiki v1.
- tanstack.com/highlight/latest/docs/comparison: A third party uses Shiki as the accuracy reference.
- personal-site-bu5.pages.dev/projects/personal-site/adrs/021-shiki: An independent ADR that chose Shiki for accuracy.
- Astro/VitePress default highlighter: The built-in highlighter in major static-site frameworks.
GPT-6.2 Sol: 8.2, likely 7.1 to 9.2
Astro and VitePress use Shiki for Markdown highlighting, and Zenn switched from Prism for broader grammar support and easier markup customization. Pierre’s production experience shows where the trade-off changes for large diffs and frequent edits. The survey evidence measures satisfaction with Astro, so Shiki’s score rests on framework adoption and firsthand reports.
- docs.astro.build/en/guides/syntax-highlighting: Astro uses Shiki by default for Markdown.
- vuejs.github.io/vitepress/v1/guide/markdown#syntax-highlighting-in-code-blocks: Stable VitePress uses Shiki for Markdown code blocks.
- zenn.dev/team_zenn/articles/zenn-prism-to-shiki?locale=en: Zenn describes its production migration and publishes comparative timings.
- pierre.computer/writing/on-highlighting-code: Diff viewer team reports relying on workers and caches to manage highlighting cost.
- 2025.stateofjs.com/en-US/libraries/meta-frameworks: Survey ranks Astro highly for satisfaction and measures the framework as a whole.
Safe7.4
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has no advisories ever recorded and an MIT licence. Its 8 dependencies are mostly its own @shikijs packages. The Scorecard is 5.2, with zero scores on token permissions, pinned dependencies and security policy.
- advisories total: 0 advisories.
- scorecard score: 5.2, with several weak checks.
- npm dependencies: 8 dependencies, mostly its own packages.
GPT-6.2 Sol: 6.8, likely 5.5 to 8.0
Shiki uses the permissive MIT license, has eight direct dependencies mostly under its own scope, and has no recorded OSV advisories. GitHub Actions publishes to npm from tagged releases, and GitHub verifies the 4.6.0 tag signature. The 5.2 OpenSSF Scorecard flags weak workflow token permissions, unpinned dependencies, and a missing security policy. The number of people who can publish and the project’s response time for security reports remain unclear.
- npm license, dependencies; advisories total: MIT, eight direct dependencies, and zero OSV advisories.
- scorecard score, checks: 5.2 overall with zero scores for token permissions, pinned dependencies, and security policy.
- raw.githubusercontent.com/shikijs/shiki/v4.6.0/packages/shiki/package.json: Seven of the eight direct dependencies are under the Shiki scope.
- raw.githubusercontent.com/shikijs/shiki/v4.6.0/.github/workflows/release.yml: Tag-triggered npm publishing with write permissions and actions referenced by version tags.
- github.com/shikijs/shiki/releases/tag/v4.6.0: GitHub verifies the tag and commit signatures.
- github.com/shikijs/shiki/security: GitHub lists no security policy or published project advisories.
Good
- It colors code exactly like VS Code, with hundreds of languages and themes from the TextMate ecosystem.
- The pure JavaScript regex engine now supports all built-in grammars, so it can run without WASM.
- It has a rich transformer API and add-ons such as Twoslash, line highlights, diffs and dual themes.
- It is very active, with frequent releases and major versions that only remove APIs already marked deprecated.
Bad
- It only highlights code. For editing in the browser you need CodeMirror or Monaco.
- The full bundle is large (about 1.2 MB gzip), so client-side use needs fine-grained imports to stay small.
- Highlighting is slower and produces more HTML than lighter tools such as Prism or Sugar High.
- The OpenSSF Scorecard is middling at 5.2, with no security policy and no pinned dependencies.
The numbers
- npm downloads, 4 weeks
- 154M ×9.7 in a year
- GitHub stars
- 14k
- Commits, 12 months
- 148
- npm version
- 4.6.0 Nov 2026
- Versions, 12 months
- 22
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.2 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (shikijs/shiki), npm (shiki), OSV and the OpenSSF Scorecard.