There are a couple plugins out there that are either incomplete, or don’t adhere fully to the original zencoding spec. Instead of trying to reinvent the wheel, I grabbed the original parser libraries from the author’s repo, modified a little and culled a lot, for a pretty simple, straightforward jQuery plugin.

Very easy to use – add the plugin script, and all jQuery instances will now have a new method “zencode”, which accepts an abbreviation string, expands it, and sets the html of the calling element to the new markup.

While I’d considered (and have some half-baked attempts) at adding some templating-type behavior (e.g., pass objects as additional params and reference them in the string), in the end I think it makes more sense to adhere totally to the spec, and let jQuery do the work. It’s pretty simple to add some extra dynamism:

Hope somebody else finds it useful – all credit to Mr. Chikuyonok.

It’s available on my github page at