# isagalaev/highlight.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/isagalaev-highlight-js).**

24,937 stars · 3,729 forks · JavaScript · BSD-3-Clause

## Links

- GitHub: https://github.com/isagalaev/highlight.js
- Homepage: https://highlightjs.org/
- awesome-repositories: https://awesome-repositories.com/repository/isagalaev-highlight-js.md

## Description

highlight.js is a JavaScript syntax highlighter and client-side code formatter that transforms plain text source code into highlighted HTML for web display. It provides syntax highlighting across a wide variety of programming languages.

The library includes an automatic language detector that identifies the programming language of a code block to apply the correct highlighting rules without manual tagging. It is designed for web worker compatibility, allowing the highlighting process to run in background threads to prevent the browser interface from freezing during the processing of large volumes of code.

This zero-dependency runtime handles both automatic and manual language specification to format source code directly in the browser.

## Tags

### User Interface & Experience

- [Syntax Highlighters](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighters.md) — Provides a comprehensive syntax highlighting library that renders code snippets with color-coded styles for the web. ([source](https://github.com/isagalaev/highlight.js#readme))
- [Syntax Highlighting](https://awesome-repositories.com/f/user-interface-experience/syntax-highlighting.md) — Provides a library for parsing and rendering source code with color-coded syntax styling for web pages. ([source](https://github.com/isagalaev/highlight.js#readme))
- [High-Performance Rendering](https://awesome-repositories.com/f/user-interface-experience/high-performance-rendering.md) — Optimizes the rendering of large volumes of code using web workers to maintain high UI performance.
- [DOM-Based Rendering](https://awesome-repositories.com/f/user-interface-experience/text-rendering/dom-based-rendering.md) — Implements a rendering process that transforms code text into HTML elements for browser-based styling.

### Artificial Intelligence & ML

- [Source Code Language Detectors](https://awesome-repositories.com/f/artificial-intelligence-ml/language-detection-tools/source-code-language-detectors.md) — Acts as a specialized library designed to identify the programming language of source code blocks.
- [Heuristic Language Detectors](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-processing/heuristic-language-detectors.md) — Uses frequency analysis of keywords and patterns to identify the programming language of a code block.

### Development Tools & Productivity

- [Syntax Highlighters](https://awesome-repositories.com/f/development-tools-productivity/syntax-highlighters.md) — Provides a zero-dependency formatter that transforms plain text source code into highlighted HTML for browser rendering.

### Programming Languages & Runtimes

- [Syntax Rule Definitions](https://awesome-repositories.com/f/programming-languages-runtimes/language-specifications-standards/language-specifications/syntax-rule-definitions.md) — Provides a grammar-based system to define how different programming languages should be highlighted.
- [Programming Language Detectors](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-detectors.md) — Automatically identifies the programming language of code blocks to apply correct highlighting rules. ([source](https://github.com/isagalaev/highlight.js#readme))
- [Lexical Tokenizers](https://awesome-repositories.com/f/programming-languages-runtimes/regular-expression-engines/lexical-tokenizers.md) — Utilizes regular expressions to tokenize source code into categories for syntax mapping.

### Web Development

- [Client-Side Code Formatters](https://awesome-repositories.com/f/web-development/client-side-code-formatters.md) — Processes and styles source code directly in the browser to avoid the need for server-side rendering.
- [Background Processing Workers](https://awesome-repositories.com/f/web-development/background-processing-workers.md) — Supports offloading the syntax highlighting process to web workers to keep the UI responsive.

### Software Engineering & Architecture

- [Zero-Dependency Libraries](https://awesome-repositories.com/f/software-engineering-architecture/zero-dependency-libraries.md) — Provides a zero-dependency runtime that operates using standard JavaScript without external binaries.

### Part of an Awesome List

- [Syntax Highlighting](https://awesome-repositories.com/f/awesome-lists/devtools/syntax-highlighting.md) — JavaScript syntax highlighter.
