calibre is a free and open source e-book library management application.
Convert LRF (Sony BeBB) files to EPUB, PDF, RTF, and HTML. Also converts PDF and DOCX to EPUB.
Sigil is a multi-platform WYSIWYG ebook editor. It is designed to edit books in ePub format.