7 Awesome Free Syntax Highlighters – To Enhance User Readability
Posted on August 29, 2009, under JavaScript,
Bookmark it
According to WikiPedia:
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it’s made only for human readers/editors.
SyntaxHighlighter 2.0 is one of the most popular fully functional self-contained code syntax highlighter developed in JavaScript. Alex Gorbatchev started this project in 2004 and since then has gained a lot of acceptance. Version 2.0 comes with a near complete rewrite, clean up, optimization, standard compliance and new features.
Features include:
- Easy to setup
- Over 20 syntax brushes available (PHP, SQL, JavaScript, HTML etc.)
- You can easily change the font size in the highlighted elements without having to mess around with additional CSS.
- Allows you to force highlighted elements on the page to be collapsed by default.
- Allows you to turn detection of links in the highlighted element on and off. If the option is turned off, URLs won’t be clickable.
- Allows you to turn line wrapping feature on and off.
- Source: http://alexgorbatchev.com/wiki/SyntaxHighlighter
- Demos: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Brushes
- License: LGPL 3
GeSHI is a Generic Syntax Highlighter that aims to be a simple but powerful highlighting class. Initially, it was started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalized to this project.
Features include:
- Support for a wide range of popular languages
- Easy to add a new language for highlighting
- Highly customisable output formats
GeSHi aims to do this all as quickly as possible. Many customisable features of GeSHi facilitate speed increases, and you can easily find a balance between the amount of highlighting done and the speed in which it is done.
- Source: http://qbnz.com/highlighter/
- Demo: http://qbnz.com/highlighter/demo.php
- Download: http://sourceforge.net/projects/geshi/files/
- License: GNU GPL
SHJS is a JavaScript application which highlights source code passages in HTML documents. These docs are highlighted on the client side by the web browser. SHJS has the ability to highlight source code written in many different languages since it uses language definitions from GNU Source-highlight.
- Source: http://qbnz.com/highlighter/
- Demo/Documentation: http://shjs.sourceforge.net/doc/documentation.html
- Download: http://shjs.sourceforge.net/doc/download.html
- License: GNU GPL Version 3
JSHighlighter is a JavaScript dedicated Syntax Highlighter. It requires JSL and then it is compatible with all JavaScript 1.2 browser, starting from IE4.
Features include:
- Really fast basic highlight that should be used with some other languages too (ActionScript and maybe others)
- Complete Full Highlight (not fast as basic convertion with old CPUs)
- Compatible with All JS 1.2 or greater browser
- Unobtrusive way to highlight JavaScript Source Code
- Source: http://www.devpro.it/jshighlighter/
- Demo: http://www.devpro.it/jshighlighter/demo.html
- Download: http://www.devpro.it/jshighlighter/download.php
- License: GNU GPL Version 3
Codemirror is an on the fly JavaScript Syntax Highlighting engine that can highlight many different languages (PHP, JavaScript, HTML, CSS etc.).
CodeMirror is a JavaScript library that can be used to create a relatively pleasant editor interface for code-like content ? computer programs, HTML markup, and similar. If a parser has been written for the language you are editing (see below for a list of supported languages), the code will be coloured, and the editor will help you with indentation.
- Source: http://marijn.haverbeke.nl/codemirror/
- Demo: JavaScript | XML/HTML | CSS | SPARQL | HTML mixed-mode
- Documentation: http://marijn.haverbeke.nl/codemirror/manual.html
- License: ZLib-Style
Chili is a fully customizable and fast JQuery Code Highlighter Plugin that comes bundled with recipes for C++, C#, CSS, Delphi, Java, JavaScript, LotusScript, MySQL, PHP, and XHTML.

Features include:
- Supports line numbers
- Renders identically on Internet Explorer, Firefox, Opera, and Safari
- Supports line numbers
- Many configuration options: Static, Dynamic, Automatic, Manual, Ad-Hoc
- The recipe format gives full control on highlighting
- Source: http://noteslog.com/chili/
- Download: http://code.google.com/p/jquery-chili-js/downloads/list
- License: MIT
JUSH is a JavaScript Syntax Highlighter that can be used for client-side syntax highlighting of the following languages: HTML, CSS, JavaScript, PHP, SQL, php.ini and Apache config. The JS highlighter is also available as a JQuery Plugin.
Features include:
- Highlights languages embedded into each other
- Links to documentation of all languages
- Easily color modification using CSS
- Recognizes complete PHP syntax including __halt_compiler, heredoc, backticks, {$} variables inside strings, namespaces
- Source: http://jush.sourceforge.net/
- Demo: http://jush.sourceforge.net/#demo
- Download: http://jush.sourceforge.net/#download
Do you wish to receive the latest updates as soon as they are posted? Get our RSS Feed or Subscribe to the Newsletter!
- August 29, 2009
- article by Gabriel C.
- 6 comments
Related Posts
-
Code Editor with Realtime Syntax Highlighting: JS-CodeEditat January 5, 2010 with 2 comments
-
Fancy (jQuery) AJAX Captchas – For an Awesome User Experienceat May 28, 2009
-
pChart: Free PHP Class to Create Aliased Chartsat February 27, 2010
-
UIZE, a free powerful Open Source object oriented JavaScript Frameworkat August 10, 2009
-
Free, Fast, Professional & Easy to Use WYSIWYG Editor: CKEditorat August 27, 2009







6 Replies to "7 Awesome Free Syntax Highlighters – To Enhance User Readability"
August 30, 2009 at 10:41 PM
vim :TOhtml is nice too! :)
August 31, 2009 at 3:23 AM
There’s another great library: http://softwaremaniacs.org/soft/highlight/en/
August 31, 2009 at 4:05 AM
[...] 7 Awesome Free Syntax Highlighters [...]
September 30, 2009 at 6:24 AM
Nice list, excellent overview with these little examples of each of them.
On Alex Gorbatchev highlighter, you might want to add a link to this overview of available language brushes for the SyntaxHighlighter which contains many more then the default 20 supported languages and some alternative improved brushes (syntax scripts) for Lua and PHP and others.
October 6, 2009 at 8:53 AM
>> Over 20 syntax brushes available (PHP, SQL, JavaScript, HTML etc.)
Thanks for adding a link to my overview to your post. I shouldn’t nitpick, I know, but 20 is the amount that comes in the original package, I list 45 brushes and still add more every week.
October 8, 2009 at 3:10 AM
[...] 7 awesome highlighters [...]