10 Best JavaScript Syntax Highlighting Libraries

Curated by the Openbase team and community.Learn more

Curated by the Openbase team and community. Learn more

highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.

License Icon
License: BSD-3-Clause
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.8/ 5
42
Top Feedback
13Great Documentation
13Easy to Use
7Performant
GitHub Stars
19K
Weekly Downloads
7M
Last Commit
4d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

prismjs

Lightweight, robust, elegant syntax highlighting.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
4.7/ 5
7
Top Feedback
7Great Documentation
7Easy to Use
6Performant
GitHub Stars
10K
Weekly Downloads
5M
Last Commit
3d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

react-error-overlay

Set up a modern web app by running one command.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
5.0/ 5
1
Top Feedback
1Great Documentation
1Easy to Use
1Performant
GitHub Stars
91K
Weekly Downloads
6M
Last Commit
4d ago
Bundle Size (min+gzip)
112.5KB
Not Tree-Shakeable
low

lowlight

Virtual syntax highlighting for virtual DOMs and non-HTML things

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
1
Top Feedback
1Great Documentation
1Easy to Use
GitHub Stars
372
Weekly Downloads
4M
Last Commit
20d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
nh

ngx-highlightjs

Angular syntax highlighting module

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.0/ 5
2
Top Feedback
1Performant
1Highly Customizable
1Poor Documentation
GitHub Stars
203
Weekly Downloads
39K
Last Commit
2mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
rsc

react-simple-code-editor

Simple no-frills code editor with syntax highlighting

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.8/ 5
6
Top Feedback
4Great Documentation
4Easy to Use
3Responsive Maintainers
GitHub Stars
921
Weekly Downloads
245K
Last Commit
8mos ago
Bundle Size (min+gzip)
3.60KB
Not Tree-Shakeable
vpe

vue-prism-editor

A dead simple code editor with syntax highlighting and line numbers. 3kb/gz

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
1
Top Feedback
N/A
GitHub Stars
504
Weekly Downloads
17K
Last Commit
20d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
rcb

react-code-blocks

Modified Atlaskit's Code Block to support more languages (i.e graphql, reasonml, etc) and theme (i.e railscast, darcula, monokai, etc) code snippets!

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
1
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
12K
Last Commit
N/A
Bundle Size (min+gzip)
N/A
Tree-Shakeable

gatsby-remark-prismjs

Build blazing fast, modern apps and websites with React

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
52K
Weekly Downloads
36K
Last Commit
2d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

@theme-ui/prism

Build consistent, themeable React apps based on constraint-based design principles

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
4K
Weekly Downloads
4K
Last Commit
7d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
ref

refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
402
Weekly Downloads
3M
Last Commit
13hrs ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
rsh

react-syntax-highlighter

syntax highlighting component for react with prismjs or highlightjs ast using inline styles

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
2K
Weekly Downloads
3M
Last Commit
3mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable

@uiw/react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
243
Weekly Downloads
8K
Last Commit
3d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
rc

react-codemirror2

Codemirror integrated components for React

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
1K
Weekly Downloads
247K
Last Commit
12d ago
Bundle Size (min+gzip)
2.79KB
Not Tree-Shakeable

@readme/syntax-highlighter

ReadMe's React-based syntax highlighter

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
1
Weekly Downloads
5K
Last Commit
13d ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

prism-react-renderer

πŸ–ŒοΈ Renders highlighted Prism output to React (+ theming & vendored Prism)

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
1K
Weekly Downloads
312K
Last Commit
4mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable

react-fast-highlight

A fast react component wrapper for highlight.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
37
Weekly Downloads
633
Last Commit
5d ago
Bundle Size (min+gzip)
1.55KB
Tree-Shakeable
rhw

react-highlight-words

React component to highlight words within a larger body of text

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
2K
Weekly Downloads
218K
Last Commit
7mos ago
Bundle Size (min+gzip)
5.61KB
Not Tree-Shakeable
rr

react-refractor

Syntax highlighter for React based on Prism/refractor, utilizing VDOM for efficient updates

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
39
Weekly Downloads
25K
Last Commit
1mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
grp

gatsby-rehype-prismjs

A Gatsby theme to build flaring fast blogs from headless Ghost CMS

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
117
Weekly Downloads
203
Last Commit
1mo ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
nm

ngx-md

Angular(ngx) directive for parsing markdown content in your web application.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
258
Weekly Downloads
3K
Last Commit
2mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
ssh

simple-syntax-highlighter

A very lightweight syntax highlighter for Vue.js & vue 3, supports multiple coding languages, read only.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
20
Weekly Downloads
834
Last Commit
6d ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
rh

react-highlight

React component for syntax highlighting

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
696
Weekly Downloads
40K
Last Commit
8mos ago
Bundle Size (min+gzip)
271.0KB
Not Tree-Shakeable

gatsby-remark-highlight-code

Adds stylish cards and syntax highlighting to code blocks in markdown files

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
47
Weekly Downloads
639
Last Commit
3mos ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable

@wizdm/prism

The ultimate SPA boilerplate

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
114
Weekly Downloads
62
Last Commit
3mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
grv

gatsby-remark-vscode

Gatsby plugin to provide VS Code’s syntax highlighting to Markdown code fences

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
265
Weekly Downloads
869
Last Commit
3mos ago
Bundle Size (min+gzip)
107.8KB
Not Tree-Shakeable
vh

vue-highlightjs

Syntax highlighting with highlight.js for Vue.js 2.x

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
320
Weekly Downloads
14K
Last Commit
5mos ago
Bundle Size (min+gzip)
270.4KB
Not Tree-Shakeable
vhj

vue-highlight.js

πŸ“œ Highlight.js syntax highlighter component for Vue.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
190
Weekly Downloads
4K
Last Commit
9mos ago
Bundle Size (min+gzip)
2.81KB
Tree-Shakeable

vue-code-highlight

Beautiful code highlighter as Vue.js component.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
83
Weekly Downloads
3K
Last Commit
5mos ago
Bundle Size (min+gzip)
4.58KB
Tree-Shakeable

@sanar/react-native-highlight-text

Text highlighter for React Native made with TypeScript

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
51
Weekly Downloads
1K
Last Commit
8mos ago
Bundle Size (min+gzip)
1.28KB
Tree-Shakeable
vh

vue3-highlightjs

Syntax highlighting with highlight.js for Vue.js 3.x

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
9
Weekly Downloads
694
Last Commit
1yr ago
Bundle Size (min+gzip)
271.8KB
Tree-Shakeable
nhj

ngx-highlight-js

Angular for syntax highlighting with highlight.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
20
Weekly Downloads
2K
Last Commit
5mos ago
Bundle Size (min+gzip)
N/A
Tree-Shakeable
rfb

react-filter-box

Filter box which support AND/OR, syntax highlight and AutoComplete

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
176
Weekly Downloads
2K
Last Commit
1yr ago
Bundle Size (min+gzip)
131.9KB
Not Tree-Shakeable
rnh

react-native-highlight-words

Find and highlight words within a larger body of text πŸ–

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
173
Weekly Downloads
12K
Last Commit
3yrs ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
rhj

react-highlight.js

A simple React wrapper around the Highlight.js library

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
98
Weekly Downloads
11K
Last Commit
2yrs ago
Bundle Size (min+gzip)
250.5KB
Not Tree-Shakeable
rp

react-prism

React.js + prismjs syntax hightlight component

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
185
Weekly Downloads
4K
Last Commit
4yrs ago
Bundle Size (min+gzip)
0.99KB
Not Tree-Shakeable
rl

react-lowlight

Syntax highlighter for React, utilizing VDOM for efficient updates

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
76
Weekly Downloads
3K
Last Commit
4yrs ago
Bundle Size (min+gzip)
2.69KB
Not Tree-Shakeable
ah

angular-highlightjs

AngularJS directive for syntax highlighting with highlight.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
299
Weekly Downloads
2K
Last Commit
5yrs ago
Bundle Size (min+gzip)
334.3KB
Not Tree-Shakeable
grc

gatsby-remark-codemirror

CodeMirror syntax highlighting plugin for Remark and Gatsby

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
38
Last Commit
12d ago
Bundle Size (min+gzip)
65.1KB
Not Tree-Shakeable
pch

@hashicorp/platform-code-highlighting

Code highlighting utilities for HashiCorp next.js websites

License Icon
License: MPL-2.0
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
2K
Last Commit
N/A
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
ahj

angular2-highlight-js

highlight.js integration with Angular

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
21
Weekly Downloads
524
Last Commit
1yr ago
Bundle Size (min+gzip)
0.67KB
Tree-Shakeable
rns

react-native-syntax-highlighter

a syntax highlighter for react native using https://github.com/conorhastings/react-syntax-highlighter under the hood

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
127
Weekly Downloads
1K
Last Commit
2yrs ago
Bundle Size (min+gzip)
1.64KB
Not Tree-Shakeable
gsh

graphql-syntax-highlighter-react

A React component for highlighting GraphQL syntax.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
691
Last Commit
N/A
Bundle Size (min+gzip)
0.22KB
Not Tree-Shakeable
vp

vue-prism

Highlight code with Vue.js and Prism.js

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
646
Last Commit
N/A
Bundle Size (min+gzip)
6.39KB
Not Tree-Shakeable

react-json-syntax-highlighter

Serialize javascript objects as highlighted, formatted json

License Icon
License: Apache-2.0
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
2
Weekly Downloads
640
Last Commit
2yrs ago
Bundle Size (min+gzip)
1.39KB
Not Tree-Shakeable
rc

rainbow-code

Simple syntax highlighting library written in javascript

License Icon
License: Apache-2.0
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
3K
Weekly Downloads
341
Last Commit
1yr ago
Bundle Size (min+gzip)
11.4KB
Not Tree-Shakeable
vhc

vue-highlight-component

highlight code using highlight.js and vue component.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
33
Weekly Downloads
288
Last Commit
4yrs ago
Bundle Size (min+gzip)
0.36KB
Not Tree-Shakeable

@ngx-prism/core

Simple Angular 2+ Prism highlighter module.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
13
Weekly Downloads
267
Last Commit
3yrs ago
Bundle Size (min+gzip)
1.31KB
Tree-Shakeable
vs

vue-snippet

Insert text snippet with highlighting and Prismjs

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
N/A
Weekly Downloads
212
Last Commit
4yrs ago
Bundle Size (min+gzip)
N/A
Not Tree-Shakeable
sh

snippet-highlight

A lightweight, easy-to-use and framework agnostic syntax highlighter for your code examples(snippets) in web applications

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
4
Weekly Downloads
134
Last Commit
3yrs ago
Bundle Size (min+gzip)
0.20KB
Tree-Shakeable