# Shiki

[BASE product page](<https://base.akulich.dev/en/library/shiki/>) · [Resource](<https://github.com/shikijs/shiki>)

ID: shiki · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

Syntax highlighting using TextMate grammars: generates HTML to display code in documentation, blogs, and developer interfaces\.

## Type

Web framework / library

## Entry type

library

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/shiki/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/shiki/#resource-access>)

Code and local use under MIT\.

## [Paid features and costs](<https://base.akulich.dev/en/library/shiki/#resource-access>)

Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Access and limitations](<https://base.akulich.dev/en/library/shiki/#resource-access>)

Code and local use under MIT\. Computing resources, self\-hosting, and external services are paid for separately if used\.

## [Use cases](<https://base.akulich.dev/en/library/shiki/#resource-tasks>)

- Display code with syntax highlighting
- Generate highlighted HTML and add it to the documentation page

## Category IDs

- frontend

## Subcategory IDs

- frontend\.utilities

## Tags

- Shiki
- web
- Development

## Also known as

- shikijs/shiki
- shiki\-syntax\-highlighter
- shiki

## [Selection purpose](<https://base.akulich.dev/en/library/shiki/#resource-selection>)

Display code with syntax highlighting

## [Choose this when](<https://base.akulich.dev/en/library/shiki/#resource-selection>)

- Display code with syntax highlighting
- Generate highlighted HTML and add it to the documentation page

## [Requirements](<https://base.akulich.dev/en/library/shiki/#resource-selection>)

- For codeToHtml, specify lang and theme; with your own highlighter, preload the required languages and themes\.

## [Limitations](<https://base.akulich.dev/en/library/shiki/#resource-selection>)

- Costs and limits of free use: Computing resources, self\-hosting, and external services are paid for separately if used\.
- Terms of use: MIT for the code; dependencies have separate licenses\.
- createHighlighter and resource loading are asynchronous; the created instance is recommended to be cached rather than recreated in a hot loop\.

## [Questions before use](<https://base.akulich.dev/en/library/shiki/#resource-faq>)

### What can you use for free in Shiki?

Code and local use under MIT\.

### What additional costs might arise with Shiki?

Computing resources, self\-hosting, and external services are paid for separately if used\.

### What terms of use matter for Shiki?

MIT for the code; dependencies have separate licenses\.

### How do you get started with Shiki?

Choose the code block's language, grammar, and theme\. Generate highlighted HTML and add it to the documentation page\. Add real data and error handling; check the production build\.

### Do you need CSS for each token's color?

codeToHtml returns HTML with inline styles on tokens\. Shorthands load the required language/theme themselves and cache them in memory\.

### How do you highlight synchronously after initialization?

Create a highlighter using await createHighlighter with the langs/themes list\. Then codeToHtml on that instance runs synchronously for resources already loaded; load additional resources through loadLanguage/loadTheme\.

## Sources for the selection guide

- [https://github\.com/shikijs/shiki](<https://github.com/shikijs/shiki>)
- [https://raw\.githubusercontent\.com/shikijs/shiki/HEAD/README\.md](<https://raw.githubusercontent.com/shikijs/shiki/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/shikijs/shiki/HEAD/LICENSE](<https://raw.githubusercontent.com/shikijs/shiki/HEAD/LICENSE>)
- [https://www\.open\-source\-tools\.com/](<https://www.open-source-tools.com/>)
- [https://shiki\.style/guide/install](<https://shiki.style/guide/install>)

## [Possible workflow](<https://base.akulich.dev/en/library/shiki/#resource-scenario>)

Display code with syntax highlighting\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- Web application source code and the intended workflow\.
- The project's framework and runtime version\.

## Steps

1. Choose the code block's language, grammar, and theme\.
2. Generate highlighted HTML and add it to the documentation page\.
3. Add real data and error handling; check the production build\.

## Check your result

- The workflow works after a page refresh and with invalid data\.
- The bundle, server rendering, and supported browsers suit the project\.

## [License](<https://base.akulich.dev/en/library/shiki/#resource-license>)

MIT for the code; dependencies have separate licenses\.

## License explanations for the specified scope

### MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed\-source commercial product\. When sharing copies or substantial portions of the code, retain the license text and copyright notice\. You do not need to open\-source your entire project; the author provides no warranties\.

[License terms](<https://opensource.org/license/mit>)

## [Sources](<https://base.akulich.dev/en/library/shiki/#resource-sources>)

- [Official source](<https://github.com/shikijs/shiki>)
- [Official source](<https://raw.githubusercontent.com/shikijs/shiki/HEAD/README.md>)
- [License](<https://raw.githubusercontent.com/shikijs/shiki/HEAD/LICENSE>)
- [Catalog / discovery source](<https://www.open-source-tools.com/>)
- [Official source](<https://shiki.style/guide/install>)

## Editorial review date

2026\-10\-06

## Editorial review scope

The purpose, current repository license, and separate terms for code, services, and models have been reviewed\. The product was not run, and no security audit was performed\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
