http://code.google.com/p/hyphenator/
And example in action http://www.bramstein.com/projects/typeset/flatland/
And example in action http://www.bramstein.com/projects/typeset/flatland/
https://github.com/bramstein/Hypher
It is quite small and fast, and mostly aimed at integration with other libraries, unlike Hyphenator.js (which comes with a partial DOM library.) An example integration can be seen in the Treesaver library (https://github.com/bramstein/treesaver/tree/hyphenation) where it is used to hyphenate magazine columns.