syntaxhighlighters

This question was already asked hundred times before. But this is why this post was started. When I was searching a highlighter for a blog, I had to read too many Q/A, which all are different in the form of "where" and "what language must be highlighted", but all questions are the same in general.

So I suggest to make a big Community Wiki on this subject. Lets make a list of highlighting tools: one post about one tool (to make possible to bring up/down each tool by voting). I suggest the following format:


Tool/project

http://homepage

  • Supported languages:
    ...
  • Form of use:
    open source code / online web service / executable / etc., license
  • Pluses:
    special features, unique advantages, ...
  • Minuses:
    requirements, known issues, bugs, ...

P.S.: And I think, better not to post one-language-highlighters, and post only multi-language tools.because:

  1. there too much of one-language-highlighters, written by thousand of amateurs
  2. they usually have low quality
  3. when you are blogging, you may want to paste code in different languages, not always the same one, so universal tool is better
community wiki

feedback

closed as not constructive by Bill the Lizard Jun 1 at 11:02

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

SyntaxHighlighter (by Alex Gorbatchev)

http://alexgorbatchev.com/SyntaxHighlighter/

community wiki

I'm not sure if this supports export to html. Otherwise, this is an excellent choice. Everything is in client side javascript, which makes it very easy to deploy and integrate to your existing website, no matter what is used server side. – MAK Nov 9 '10 at 6:21
@MAK, yes, it's not an exporter, but it seems to do well the main goal — syntax-highlighting for blogs. – Nakilon Nov 9 '10 at 8:15
feedback

Highlight.js (by Software Maniacs)

http://softwaremaniacs.org/soft/highlight/en/

community wiki

feedback

GeSHi

http://qbnz.com/highlighter/

  • Supported languages:
    ~250

  • Form of use:
    PHP scripts

  • Pluses:
    online service is highly customisable
    plugins for phpBB (v2), WordPress, Typo3, Joomla, OpenOffice, MediaWiki (actually used on Wikipedia), DokuWiki, net2ftp

  • Minuses:
    downloaded version needs PHP

community wiki

site is currently down – Nakilon Aug 13 '11 at 11:53
now is up again – Nakilon Sep 16 '11 at 8:18
feedback

Pygments

http://pygments.org/

  • Supported languages:
    ~100

  • Form of use:
    Python module
    command-line tool
    can be used indirectly through paste-service http://paste.pocoo.org
    BSD license

  • Pluses:

    • Different stages (lexer, formatter, filter) are pick and choose, so various combinations of language, formatting, and output format are possible.
    • It's amazingly fast
    • Extensible by custom components (modules, lexers, styles) 

  • Minuses:
    command-line tool requires Python to run
feedback

Neat Highlighter

http://www.neathighlighter.com/

  • Supported languages:
    ~170

  • Form of use:
    online service

  • Pluses:

  • Minuses:

community wiki

feedback

CodeRay

http://coderay.rubychan.de/

  • Supported languages:
    C, C++, CSS, Delphi, diff, Groovy (beta), HTML, Java, JavaScript, JSON, Nitro-XHTML, PHP, Python, RHTML (ERB+HTML), Ruby, Scheme (beta), SQL, XML, YAML

  • Form of use:
    Rubygem

  • Pluses:

  • Minuses:
    requires Ruby

community wiki

feedback

google-code-prettify

http://code.google.com/p/google-code-prettify/

  • Supported languages:
    C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, doesn't work on Smalltalk, or CAML-like languages. LISPy languages, CSS, Go, Haskell, Lua, OCAML, SML, F#, Visual Basic, Scala, SQL, Protocol Buffers, and WikiText supported via an extensions.

  • Form of use:
    Javascript

  • Pluses:

  • Minuses:

community wiki

feedback

Quick Highlighter

http://quickhighlighter.com/
seems to use GeSHi library

  • Supported languages:
    ~150

  • Form of use:
    online service

  • Pluses:

  • Minuses:

community wiki

Since GeSHi official site is down, I used this one now, but had to delete weird vertical-align:top; from source code of formatted page manually. – Nakilon Aug 13 '11 at 12:49
feedback

SilverCity

http://silvercity.sourceforge.net/
based on Scintilla

  • Supported languages:
    C/C++, CSS, HTML, PHP, JS, VBS, Python, Perl, Ruby, SQL, XML, XSLT, YAML

  • Form of use:
    Python bindings, online service

  • Pluses:

  • Minuses:

community wiki

feedback

JuSH

http://jush.sourceforge.net/

  • Supported languages:
    HTML, CSS, JavaScript, PHP, SQL, HTTP and SMTP protocol, php.ini and Apache config

  • Form of use:
    Javascript jQuery and WordPress plugin

  • Pluses:

  • Minuses:

community wiki

feedback

Colorer-take5

http://colorer.sourceforge.net/

  • Supported languages:
    ~160

  • Form of use:
    online service, console tool, C++ and Java API
    Mozilla Public License 1.1

  • Pluses:

  • Minuses:

community wiki

feedback

Webessence

http://www.webessence.nl/scripts/syntax-highlighter/

  • Supported languages:
    C, C#, Javascript, SQL, PHP, Python, VB.NET

  • Form of use:
    Javascript

  • Pluses:

  • Minuses:

community wiki

feedback

Lighter.js

http://pradador.com/code/lighterjs/

  • Supported languages:
    JS, CSS, HTML, Markdown, PHP, Python, Ruby, Shell, SQL

  • Form of use:
    add-on to javascript framework MooTools

  • Pluses:

  • Minuses:
    requires MooTools 1.2.1+

community wiki

feedback

Chili

http://code.google.com/p/jquery-chili-js/

  • Supported languages:
    PHP, JS, CSS, C++, C#, Delphi, Java, LotusScript, MySQL, ...

  • Form of use:
    jQuery plugin

  • Pluses:

  • Minuses:

community wiki

feedback

Not the answer you're looking for? Browse other questions tagged htmllanguage-agnostic syntax-highlighting or ask your own question.

Comments