| about | full list | wishlist | do it yourself | version 1.5 | useful links | history |
It is rather hard to find what language syntax brushes are available that have been created to work with the excellent SyntaxHighlighter created and maintained by Alex Gorbatchev.
Note: this article is about brushes for the new SyntaxHighlighter versions 2.0 and above (download here), which are maintained by Alex Gorbatchev himself on his alexgorbatchev.com, not the older and unmaintained version that is still available through Google Code, also known as Google’s SyntaxHighlighter. When searching for the new highlighter through Google, one’s still being brought to the old Google Code site.
About the Language Brushes Overview
The original Syntax Highlighter (version 2.0.320 at the time of this writing) comes with a plethora of brushes (aka syntax scripts, syntaxes, lexers) out of the box. These brushes are well-covered with examples on the page of the Bundled Syntaxes. However, when people create their own brushes, they will not get listed there, unless Alex Gorbatchev decides to add them to his default bundle. He can’t check each and every of them, which is why he made the brushes idea to create an extensible system. People submitting brushes are invited to do so through the forum, requiring membership to post, which lists most of them on the Brushes Category page.
In this post, I’ll just make an easy overview of all standard brushes and all new brushes, adding small examples for each of them, so you have all brushes in one place. The download locations are external, as are the sites of the maintainers of these brushes. I’ve tried to be complete, but if your brush is not here or if you find a broken link, please report it here.
List of all available language brushes
Following is the list of all avalailable language brushes for the SyntaxHighligter that I could locate on the internet. For all the bundled brushes, the homepage points to the example page of that brush at alexgorbatchev.com unless it was provided by someone else, in which case I tried to located his or her brush site.
Normally you wouldn’t want to download the bundled brushes because you have them already. The provided download is to the plain non-zipped JavaScript version of the brushes, a deeplink straight into the BitBucket’s source repository of SyntaxHighlighter.
For non-bundled brushes, if I couldn’t find a homepage, I link to the forum post or simply link here (boring, I know). Most javascript (*.js) brush files have been copied here to ease downloading. I’ve notified the creators for each and every brush. If I accidentally forgot you or wasn’t able to get through one way or the other, I apologize in advance.
Any download from this site is in the public domain and free to use, alter or distribute and comes with no warranties of any kind, unless the download itself states otherwise. If you have created the original source and you don’t like it distributed here, please let me know and I remove it from the list.
| Language name (filename.js) |
Bundled | Aliases | WP | Description | Home, download |
|---|---|---|---|---|---|
| ActionScript1 (shBrushAS3.js) |
yes | as3, actionscript3 | Adobe ActionScript, used in Flex and Flash version 3, provided by Peter Atoria. | ||
| ActionScript2 (shBrushAS3.js) |
no | as3, actionscript3 | Adobe ActionsScript, supports Flash 10 and is an extension to the original provided brush. This brush was originally indepently developed and later adopted for SyntaxHighlighter 2.0 by Gabriel Mariani. | ||
| Ada (shBrushAda.js) |
no | ada | Ada (after Ada Lovelace) is and has been the language of choice for the DOD in the US for decades; brush created by spatterson. | ||
| Assembler (ASM)1 (shBrushAsm.js) |
no | asm, x86 | Assembler brush, almost full support for all x86 assembler instructions, kindly created and under active development by UN-I-QUE. | ||
| ASM / NASM / MASM2 (shBrushNasm.js) |
no | nasm8086, 8086, nasm, asm, masm | Provides x86 assembly instructions and NASM / MASM support; brush created by Tistory (?). | ||
| AppleScript (shBrushAppleScript.js) |
no | applescript | You use AppleScript to automate tasks on the Apple; brush created by David Chamber. | ||
| AutoHotKey (shBrushAhk.js) |
no | ahk, autohotkey | AutoHotKey or AHK is a way to script and automate any application on your system, whether it supports automation or not; brush provided by mjneish (test page), probably created by “n-l-i-d” (no reference available). | ||
| Bash / Shell (shBrushBash.js) |
yes | bash, shell | Unix / Linux sh / shell / bash script for automating system tasks. | ||
| Batch (shBrushBat.js) |
no | bat,batch,cmd | *.BAT and *.CMD files on Windows can contain batch file commands; brush created by Ildar Shaimordanov. | ||
| C# (shBrushCSharp.js) |
yes | c#, c-sharp, csharp | C# is the Lingua franca of the Microsoft .NET world. | ||
| C++ (shBrushCpp.js) |
yes | cpp, c | Good ole’ C++, cross platform programming, compile into native machine code. | ||
| Clojure (shBrushClojure.js) |
no | clojure, Clojure, clj | Clojure is a modern dialect of Lisp, created by Travis Whitton. | ||
| ColdFusion (shBrushColdFusion.js) |
no | cf, coldfusion | Adobe Coldfusion is a declarative / imperative enterprise language; brush created by Jen. | ||
| CSS (shBrushCss.js) |
yes | css | Cascading Style Sheets for decorating HTML elements. | ||
| Delphi (shBrushDelphi.js) |
yes | delphi, pas, pascal | Borland Delphi, with origins in procedural Pascal, still widely used. | ||
| Diff (shBrushDiff.js) |
yes | diff, patch | Use this to highlight output of the commandline diff tool, i.e., for comparing two text files. | ||
| Erlang1 (shBrusErlang.js) |
no | erlang, erl | Erlang is a GP concurrent programming language by a(mainly) functional paradigm; brush created by Will Larson, (based on original code by Steve Gilham’s). | ||
| Erlang2 (shBrushErlang2.js) |
no | erlang, erl | Much improved alternative brush for Erlang by Steve Gilham, based on an improved version of his 1.5 SH Erlang brush. | ||
| F# (shBrushFSharp.js) |
no | f#,f-sharp, fsharp | F# is Microsoft’s functional language for the .NET environment; brush kindly adjusted for 2.0 by Steve Gilham based on his 1.5 version of the brush. | ||
| Groovy (shBrushGroovy.js) |
yes | groovy | Groovy is an object oriented alternative for the Java platform. | ||
| Java (shBrushJava.js) |
yes | java | Java, for cross-platform enterprise development: build once, run everywhere. | ||
| JavaFX (shBrushJavaFX.js) |
yes | jfx, javafx | Java’s (Sun’s) alternative to Flash and Silverlight, provided by Patrick Webster. | ||
| JavaScript (shBrushJScript.js) |
yes | js, jscript, javascript | Known by many names: javascript, ecmascript, jscript, it’s the language to spice up your static web pages. | ||
| LaTeX (shBrushLatex.js) |
no | latex, tex | LaTeX and TeX are the de facto document languages in the academic and scientific community and can be used to create PDF, PS, DVI and other outputs; brush created by Jorge Martinez de Salinas. | ||
| LSL (shBrushLsl.js) |
no | lsl | Linden Scripting Language, used in Second Life, provided by sabro | ||
| Lua1 (shBrushLua.js) |
no | lua | Lua is an imperative / functional interpreted scripting language; brush created by bear.mini. | ||
| Lua2 (shBrushLua.js) |
no | lua | Alternative brush for the previous, hosted on a Korean site. | ||
| Mathematica (shBrushMathematica.js) |
no | mathematica, mm | Mathematica for doing mathematical calculations, plotting, computations and parallel programming, brush created by James Rohal. Note from author: the long list of functions (2200) can make the browser unresponsive when you use this brush. | ||
| MATLAB1 (shBrushMatlab.js) |
no | matlab | MATLAB is a program and language that can be used for mathematical calculations and computations, brush created by James Rohal. Note from author: the long list of functions (1300) can make the browser unresponsive when you use this brush. | ||
| MATLAB2 (shBrushMatlab.js) |
no | matlab | Simpler MATLAB brush, which doesn’t slow down your browser, contains the most-used keywords only. Submitted by mail by Will Schleter based on James’s brush. | ||
| Objective-C / Cocoa (shBrushObjectiveC) |
no | objc, obj-c | Objective-C or Cocoa, a variant of C++; brush provided by Geoffrey Byers and YoungJin Shin (v 1.5). | ||
| Oxygene (shBrushOxygene.js) |
no | oxygene, prism, delphi-prism | Delphi Prism Oxygene (aka Chrome) is Delphi.NET without the burden of backward compatibility was developed by RemObjects; brush created by rgrove. | ||
| Perl (shBrushPerl.js) |
yes | perl, pl | Interpreted scripting language, famous for bringing regular expressions to the masses. Original brush provided by Martin Kube of Beaver Creek Consulting, based on Nev Stokes 1.5 version. | ||
| PHP1 (shBrushPhp.js) |
yes | php | PHP, short for Personal Home Page, is now the acclaimed widest adopted interpreted scripting language for the internet | ||
| PHP2 (shBrushPhp.js) |
no | php | Improved version of bundled PHP brush made by David Chambers, see home/info page for more info: | ||
| Plain Text (shBrushPlain.js) |
yes | plain, text | Just text, no highlighting. | ||
| PowerShell1 (shBrushPowerShell.js) |
yes | ps, powershell | Powershell is an interactive Windows commandline scripting language, brush credits for B. v. Zanten (no url). | ||
| PowerShell2 (shBrushPowerShell2.js) |
no | powershell, posh, ps | Alternative brush, provided by Xenophane, created by Joel Bennett, updated by Claus T Nielsen. | ||
| Processing (shBrushProcessing.js) |
no | processing, Processing | Processing is a language for electronic arts and visual design. This brush is for the main Processing language, NOT for the Processing.js adaptation (see wishes). Brush by Sebastian Korczak | ||
| Python (shBrushPython.js) |
yes | py, python | Python is an object oriented interpreted scripting language, de facto language at Google’s. | ||
| RouterOS (shBrushRouterOS.js) |
no | ros | RouterOS scripts are used for scripting MikroTik routers, found here. | ||
| RPG / ILE-RPG (shBrushRpgle.js) |
no | rpgle, rpg4 | RPG or ILE-RPG is an old language still in wide use on IBM mainframes; brush created by Loyd Goodbar. | ||
| Ruby (shBrushRuby.js) |
yes | rails, ror, ruby | Interpreted scripting language, popular modular alternative for PHP and Perl. | ||
| Sahi (shBrushSahi.js) |
no | sahi, sahiscript | Sahi is used for scripting web automation and web testing, brush created by V. Narayan Raman. | ||
| Scala (shBrushScala.js) |
yes | scala | Multi paradigm language mainly as an alternative to Java for writing more concise code. | ||
| SQL (shBrushSql.js) |
yes | sql | Structured Query Language, mainly used with databases. | ||
| Visual Basic (shBrushVb.js) |
yes | vb, vbnet | The BASIC style languages, now Visual Basic, easy to use .NET language. | ||
| YAML (shBrushYaml.js) |
no | yaml, yml | YAML Ain’t Markup Language, human friendly serialization standard, created by Nicolas Perriault. | ||
| XML (shBrushXml.js) |
yes | xml, xhtml, xslt, html, xhtml | eXtended Markup Language for describing data in a general way, use this brush for (X)HTML as well. |
Couldn’t see yours? Please leave a comment with a link to your favorite highlighter or send me yours directly (abel.online at xs4all dot nl) so that I can include it.
Requested brushes and works in progress
Here’s a small list of brushes not mentioned above that I couldn’t find anywhere but that have been requested one way or the other by users of forums or blogs, or that have not been finished yet:
| Language | Wished or requested by | comments |
|---|---|---|
| ABAP | Naveen Vishal @ SH forum | the language in SAP. |
| C | jimthree @ SH forum | apparently, C++ brush is lacking a bit when it comes to plain C. |
| D | phrozen10 @ old SH google code wiki | after C came C++ came D. |
| DTD | abel @ here | document type definitions are used with XML, SGML and HTML to define what elements, entities etc are allowed and what not |
| Fortran | Blake Harms @ his blog | work in progress, seems to have bugs still, will include it once it’s working. |
| MDX | Ralp @ SH forum | expression language in .NET. |
| Processing.js | abel | Processing.js is an open programming language for people who want to program images, animation, and interactions for the web without using Flash or Java. A 1.5 brush is a available, I’ve kindly requested whether an upgrade is possible. |
| Regular Expressions | zatricky @ SH forum | as noted in the forum’s wish: it is a bit doubtful whether such brush would be helpful. |
| SCAR | Vaden @ SH forum | this is specific to the SCAR application, which depends on how the string starts, a partial syntax highlighter is provided at the link, along with some explanation on the syntax. |
| Scheme | Anonymous @ bitbucket repository | the mentioned anonymous user got quite far, but the implementation is not complete yet, see link for details and a usable brush (doesn’t support comments yet). As an alternative, use Closure brush. |
| SVG | abel @ here | Scalable Vector Graphics: more and more browsers (except IE of course) support it out of the box, default for XML based vector images, i.e. in XSL formatting objects (XSL-FO) |
| VHDL | anonymous | only a 1.5 version exists here, would love to have a 2.0 version for VHDL highlighting. |
| Whitespace | fahd shariff @ old SH Google Code wiki | the language Whitespace belongs to the esoteric languages, like Brainf*ck, Unlambda and the likes, it is special in such, that the compiler ignores everything except whitespace, making these programs extraordinarily hard to read. |
| XAML | René @ here and Marcio Roberto | XAML is a user interface markup language for Windows Presentation Foundation for .NET Framework 3.0 and higher and is primarily used with SilverLight development. |
| XPath | abel | XPath is widely used for selecting XML data and is used both standalone and in conjunction with XQuery and XSLT. |
| XQuery | abel | XQuery is used for querying XML data. |
| XSLT | abel | XSLT manipulates XML data from one format to another. |
When a brush was provided by Alex in the distro or when I managed to locate a brush, I removed it from this wish list. Let me know (comment below) when you have some wishes yourself or when you know of one of these wishes being fulfilled.
Do it yourself
If your favorite language or syntax (doesn’t need to be a language, of course) is not provided here, you can wish for it by commenting on this post so that I can include your wish in the wish list and some day someone magically creates one and notifies you or me about it. Or…! you can Create One Yourself. It is really not that hard, but it requires a bit of understanding of regular expressions and JavaScript. If you don’t have either, you can give the details of your language (what to match to what color etc) to me and perhaps I magically create one, but don’t hold your breath, time is not always on my side
.
Where to start? If you follow these three links you should be well on your way to your own syntax brush. Once finished, don’t forget to send it to me!
- The Developer’s Guide for Custom Brushes, or this alternative short tutorial.
- Learning / understanding and a reference of regular expressions.
- Trying out your regular expressions online (choose your pick).
Brushes for version 1.5
As you may have found out by now, this list is dedicated to version 2.0 of the SyntaxHighlighter, not the earlier version which is not maintained anymore (known as Google’s Code Highlighter). If you are looking for a brush for version 1.5 which is listed here, please upgrade to 2.0. It is a breeze to upgrade using the shLegacy.js file. How this is done is explained in the Upgrade Guide from 1.5 to 2.0.
An old list of supported languages for version 1.5 exists. Read through the comments to find out whether your favorite language is supported by someone for version 1.5.
Useful links
Following is a simple list of references about SyntaxHighlighter. If you have created a nice tutorial, plugin or helper program that goes together with this syntax highlighter, then drop me line, I’d be glad to add it to this overview.
| reference | description |
|---|---|
| 7 awesome highlighters | pretty, yet easy to follow overview of 7 “awesome” highlighters with a small example of each of them, Alex’s comes nr 1. |
| 16 JS Highlighters | Great overview of 16 popular javascript based syntax highlighter. Alex’s highlighter is put on top, just after the traditional GeShi highlighter. |
| 11 syntax highlighters | Simple comparison of 11 available highlighters, Alex’s highlighter is nr 2, but I believe the list is not sorted by favorite. |
| 9 useful js highlighters | Nice clean easy-to-read and follow overview of nine highlighters, puts Alex’s highlighter on top. |
| Best Syntax Highlighter | Scott Hanselman’s of computerzen.com on his blog calls Alex’s highlighter the “Best Code Syntax Highlighter for Snippets in your Blog”. |
| alex gorbatchev’s home | Homepage of Alex Gorbatchev, brings you straight to the download page of the SyntaxHighlighter. |
| download SyntaxHighlighter | Direct link to the download page, you should know this one by now! |
| list of sites using SH | Nice overview of sites using the SyntaxHighlighter, pretty big fishes there: yahoo dev network, asp.net forums, WordPress, nice! |
| SH forums | Forums, quite actively monitored by Alex Gorbatchev himself. |
| list of included brushes | List of brushes already included in the standard distribution, these brushes are included above as well (“bundled” column set to “yes”). |
| brush creation walkthrough | An easy to follow brush creation tutorial, the author takes you by the hand in creating a simple owner-specified syntax and shows by each step what he does and why. Great starting point if you find the tutorial from Alex a bit too daunting still. |
Thanks
Thanks to everyone for providing these brushes to the community and thanks to Alex Gorbatchev for sharing his excellent script with the world.
Donationware
It’s great that we can use software for free from people like Alex Gorbatchev. If you find his Syntaxhighlighter useful and you use it on your site, or if you get extra revenues because you use his software, please support him by sending him a donation, see his website for details.
From version 2.0.296, Alex says the following about switching to the Lesser General Public License v3, which shouldn’t keep anyone from donating him, rather the opposite, quote:
It was brought to my attention that donation clause isn’t compatible with LGPL, therefore I elected to sacrifice potential free beer to stay proper open source, which. This of course means that donations are no longer required, but desired just the same (or even more so now because even fewer people will donate).
History
| 2009-10-19 | added alternative x86 assembler brush and an alternative MATLAB brush (without the slow loading) |
|---|---|
| 2009-10-12 | added F# brush and alternative Erlang brush, updated XAML request for a brush |
| 2009-10-10 | fixed Erlang brush link, thanks for mentioning! |
| 2009-10-03 | added new brush for ActionScript 3, supporting Flash 10 |
| 2009-10-02 | corrected some errors in the list, added direct Wikipedia links for each language |
| 2009-10-01 | added processing brush |
| 2009-09-30 | added some requests (xaml, svg, dtd) and a useful links section |
| 2009-09-24 | layout changes, added brushes for Sahi, AHK, AppleScript |
| 2009-09-23 | update, added brushes for Lua-2, Clojure/Scheme, LSL, no luck for Fortran yet, added Mathematica, Matlab, ILE-RPG, PHP-2 and LaTeX |
| 2009-09-22 | update, added Powershell-2, Lua-1, Erlang, ASM/NASM, |
| 2009-09-21 | initial version, all bundled brushes and Batch, Yaml, Objective-C, Python, Oxygene, ColdFusion, Ada |
Also see list on Topsy tweets, which keeps track of my changes.
– Abel –

Pingback: Piotr Kwiatek » WordPress i SyntaxHighlighter
Pingback: flood restoration services
Pingback: Using Syntax Highlighter to highlight Erlang scripts in WordPress. | Frozen Rider – Roaming
Pingback: 9 Useful Javascript Syntax Highlighting Scripts | JS Tips
Pingback: How to add SyntaxHighlight of an unstandardized language in WordPress | Ruan's BLOG
Pingback: Adding a new brush to the SyntaxHighlighter Evolved plugin | http://blog.hashbangweb.com
Pingback: Syntax Highlighting in WordPress | Mr.Fish Studios
Pingback: 9 Useful Javascript Syntax Highlighting Scripts | WPsharing
Pingback: SyntaxHighlighter简介与使用 | TechGuru
Pingback: Zwei Plugins um Code-Beispiele mit Syntaxhervorhebung ansprechend zu präsentieren | WordPress-Buch