highlight.js Alternatives

Apps similar to highlight.js include Zsh Syntax Highlighting, which is free and open source. Other options are prism.js, Pygments, Lolight and Bright. You can choose from more than 10 apps like highlight.js for self-hosting, Mac, Windows, Linux and the web.

Copy a direct link to this comment to your clipboard
Alternatives
highlight.js alternatives page was last updated

Alternatives list

  1. This package provides syntax highlighting for the shell zsh. It enables highlighting of commands whilst they are typed at a zsh prompt into an interactive terminal. This helps in reviewing commands before running them, particularly in catching syntax errors.

    Cost / License

    Since

    • Since 2017

    Platforms

    • Mac
    • Windows
    • Linux
    • zsh
    Good alternative?
     
  2. prism.js icon
     2 likes

    Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2021

    Platforms

    • Online
    • Self-Hosted
    Good alternative?
     
  3. Pygments icon
     3 likes

    Generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2017

    Platforms

    • Mac
    • Windows
    • Linux
    Good alternative?
     
  4. Lolight icon
     1 like

    Lolight is a 3kB tokenizer and syntax highlighter. No language specific syntax support, just a CSS stylable breakdown into tokens. Default styles included.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2019

    Platforms

    • Self-Hosted
    Good alternative?
     
  5. Bright icon
     Like

    React Server Component for syntax highlighting.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    Good alternative?
     
  6. Shiki icon
     Like

    A beautiful syntax highlighter based on TextMate grammar, accurate and powerful.

    12 Shiki alternatives

    Cost / License

    • Free
    • Open Source (MIT)

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    Good alternative?
     
  7. Torchlight is a VS Code-compatible syntax highlighter that requires no JavaScript, supports every language, every VS Code theme, line highlighting, git diffing, and more.

    Cost / License

    • Freemium
    • Proprietary

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    Good alternative?
     
  8. CodeRay icon
     Like

    Fast and easy syntax highlighting for selected languages, written in Ruby.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    • Ruby
    Good alternative?
     
  9. This package is an open source version of GitHub’s closed-source PrettyLights project (more on that later). It supports 600+ grammars and its extremely high quality. It uses TextMate grammars which are also used in popular editors (SublimeText, Atom, VS Code, &c).

    Cost / License

    • Free
    • Open Source (MIT)

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    • npm
    Good alternative?
     
  10. Rouge icon
     Like

    Rouge is a pure Ruby syntax highlighter. It can highlight over 200 different languages, and output HTML or ANSI 256-color text. Its HTML output is compatible with stylesheets designed for Pygments.

    Cost / License

    • Free
    • Open Source

    Since

    • Since 2024

    Platforms

    • Ruby
    • Self-Hosted
    Good alternative?
     
  11. code-prettify is a syntax-coloring script to make source-code snippets in HTML prettier.

    Cost / License

    Since

    • Since 2019

    Platforms

    • Self-Hosted
    Good alternative?
     
  12. A batteries-included syntax highlighting library for Rust, based on tree-sitter.

    Cost / License

    Since

    • Since 2024

    Platforms

    • Self-Hosted
    Good alternative?
     
12 of 15 highlight.js alternatives