Saturday, December 21, 2013

calibre's ebook editor

calibre has been an excellent ebook managing and viewing software for sometime now. But we intend to live up to our slogan, making calibre the "one stop solution to all your ebook needs". To this end we have recently (since calibre 1.15) added ebook editing capabilities for ebooks in EPUB and AZW3 formats. The editor interface was made more user friendly in calibre 1.16. To avail of the features described below you will need calibre 1.16 or a newer version.

To make a few small changes like highlighting, changing font colors, using bold or italics fonts, inserting images and underlining requires almost no knowledge of HTML coding. There are GUI buttons that insert the code for you when you click on them. calibre makes these things as simple as button pushing.

In spite of the top layer of simplicity, the editor is very powerful. Those of you who know HTML coding can do a lot more. This blog post is directed towards rather lay users and will explain how to do a few simple but very useful things in detail.

To edit an EPUB or AZW3 format ebook in calibre just select the ebook in the main calibre window and right click. As you can see in the picture below many options appear:

Click on "Edit book" (the second option from the bottom). A new window opens. It looks like

As it says on the center of the window "Double click on a file on the left to start editing it".

The ebook I am going to use as an example is a recipe book made using the "Recipe Reader" plugin in calibre. For more details about the plugin you can also check out the plugin's mobileread page. With the holidays coming up you may find this category of plugins useful. I like to make notes on recipes I have used for future reference and calibre's ebook editing feature allows me to do just that as I will demonstrate.

If you double click on the first file listed in the left column called titlepage.xhtml.You see the following:

The right column now shows the cover/title page and the middle column shows the HTML code for it. The right column is a live preview. That means that very time you make any changes to the HTML code in the middle column, the effect on the ebook itself will be visible in the right column. Don't be intimidated by the HTML code. calibre makes dealing with it really easy. If you still feeling nervous, note that the very first button in the toolbar in the middle column is an undo button. Also none of the changes you make will be saved till you explicitly tell calibre to save them by clicking the save icon

in the top toolbar.  Still feeling nervous, the first time you use this editor make a copy of the book in calibre and work on the copy.

Now getting down to the action. Let us start with editing some simple text. The following is a picture of the toolbar in the center column.

From left to right the buttons are "Insert image", "Bold", "Italics", "Strike through", "Subscript", "Superscript", "Font color" and "Background color".

Lets start with a demonstration of using the font color button. For this purpose I have selected the third file in the left column:

Now say you want to add a note in red next to "1 egg" in the first line of the ebook on the right. How do you go about finding it in the HTML code. Simple, click on "Search" to the left of "Help" in the topmost toolbar in the window. A number of options show up and I click the first one called "Find/Replace" and you see:

As you can see a "Find" section shows up at the bottom of the middle column. Enter the word "egg" to find the relevant part of the HTML code. If egg happens to appear in few different places in the recipe you could be more specific and enter "1 egg" for example. Now let us will add a little note in red. Put the cursor next to egg and click the font color button and choose the red color. Some additional code appears. Without changing the position of the cursor enter the text you want. This is what it looks like:

The live preview on the right shows what the changes you made will look like in the ebook.
To change the color of already existing text just select the text in the HTML code and click the font color button and choose the color. Similarly to make some text into bold just select it and click the bold button.

On doing so, as you can see from the picture above, the text in the HTML code as well as in the ebook are converted in to bold format. Same for italics.

To highlight a bit of text select the text in the HTML code  and click on the background color button and choose the highlight color. The following picture shows a bit of text highlighted purple. The code as in all previous cases is automatically inserted on clicking the appropriate button.

Now for inserting pictures. To insert a picture click on the insert picture button in the toolbar. The following window opens up:

the window shows the images that are already a part of the ebook. You can reinsert one of those images or you can click "Import image". If you click on "Import image" it lets you choose a picture from your file system. Once you choose an image this is what you see: (This picture is taken from Wikipedia and is not of pancakes that I made :). )

The required HTML code is automatically inserted by calibre. Only there is a little problem here. As you can see the paragraph starting with "Batter" begins right next to the picture and you may prefer that it start on the next line. To fix this just enter
</p> <p>
before the word "Batter" in the HTML code as shown in the picture below.

The calibre ebook editor also allows you do some simple image editing. Double click on an image you want to edit from the list of images in the left column and it will open in the middle column as shown below.

 The image editor lets you do simple things like trim, rotate and resize images. You can also select a small section of the image with your mouse as shown below:

Then you can paste another image into it. Just copy the image from else where and then click on the paste button in the editor toolbar. I have used this procedure to paste two images in to the cover image of this ebook. the result is:

These are some of the simple and most useful things the new ebook editor feature can do. We will be adding more features but if you want to edit ebooks this should help you get started. Dive in and enjoy yourself.

Happy Holidays everyone!


  1. Thank you very much for this. I didn't know that Calibre had this. I've been using Sigil to edit my e-booksbefore this.

  2. Great! WYSIWYG would be nice though...

  3. I was very excited to see this feature in calibre. So far I've been editing my books in sigil, using a plugin 'open with' to open individual books in a portable version of sigil. Now I don't have to do any of that! Editing in calibre is so easy, compared to sigil. I also prefer this form of editing html and seeing a live preview rather than the WYSIWYG editing in sigil, I'm learning a bit about html as I go along! Thank you so much for the best piece of software on my computer right now. Seriously, I reinstalled Windows last night and calibre was the first program I installed. I install very few software, preferring to use portable versions instead. But calibre is always installed and used :-D

  4. While I appreciate this feature, it is a very inconvenient way to make notes / highlight / annotate while reading. Certain readers like me could not be bothered to lose focus with their reading by going through several steps just to hunt for and change relevant HTML code to write notes. The Kindle app by comparison only requires a tap or a click to make notes.

    1. Yeah this editor feature is mainly for authors. Implementing annotating in a way that is searchable and will simultaneously work across all operating systems and devices is quite difficult. The kindle annotations work for the kindle alone and their own kindle app. If and when we implement annotation we will try to make it work across devices because people often change their devices and it wouldn't be nice to lose annotations just because you bought a nook after a kindle.
      Still if some people want to edit books this blog post was to show that it can be done but i agree that for annotations it is not the most convenient.

  5. Thank you for this new feature... It is just what I've been looking for. I have a collection of old favourite Microwave Cookbooks that I want to replace with epub versions. Although I have found good scanned pdf versions, the epub versions have many errors.

    Now I am happily editing the error filled epubs and adding the margin notes from my old paper copies. Soon I will have replaced all of my old Microwave Cookbooks with useful epub versions.

  6. Incredible! Took my eye off the ball for a few weeks and this has arrived! Thanks for your awesome work. Was fretting about the future of Sigil and now a way forward presents itself.

  7. Im really stuck and would appreciate your help. I have an epub book I want to edit in Calibre. Its all ok, apart from the images. They are way too small in the book. I've tried to resize the images in the stylesheet and when I change the pixel size, it makes them larger in the book viewer. Great, I thought. But it doesn't save my changes, so when I open it again, I have the same small images. I really would appreciate some advice on how to display my images larger. The original images attached to the are much larger than what I require, and I just want to increase the size of the images by roughly 50% - for example to this size 297x469. Thank you.

    1. Not to be rude but just wanted to check. Did you save the changes you made before quitting?

  8. I had some time to waste and I did translate this post in Italian on my blog. Here's the link.

    Hope you will find it useful :-)

  9. Hi. I'm new here, and I was brought to a dead halt with the first step of your instructions. When I right click on the title, there *is* no button that says, "edit book." There's one that says "tweak your book," and I clicked on that, then it wanted me to click on another button that says "explode book," and I did, but it says my file isn't one that can be exploded because the mobi file does not contain a KF8 book, whatever that means. Now what do I do? (she asked plaintively)

    The only change I want to make is that a photo I have embedded late in the text of my book shows up as the very first page, in addition to where it's supposed to be. I need the version that shows up at the very beginning to go away without losing the photo where it's supposed to be. Help?

  10. You have to update to 1.8 or newer. the tweak books feature was changed to this.

  11. Hi. I converted a pdf book to epub using calibre. In the (converted) epub file, each line become paragraph. Is there any trick to edit/reformat it. Or I have to edit/reformat each line manually one by one ?

  12. see

  13. I can't thank you enough for adding the ebook editor to Calibre. Now I can retire Sigil and do all my ebook handling within the program. Not to mention that I just put together a Fedora Linux rig to try out the OS, and by golly, there is Calibre!

    I have given in the past to help development of my favorite piece of software, and here's another $50. Keep up the good work!

    1. Thanks. Our wonderful user community makes calibre fun and a pleasure to work on. The donation is much appreciated. It makes the continued and rapid development of calibre possible :)

  14. hi could any one shed any light on my problem, iv converted a word document successfully into a MOBI file i also need a EPUB, the content has converted fine into the epub but all of the images have resized and have become larger. I have used the photo edit tool and resized them and saved but the images are still enlarged and uneffected from the resizing...

    any information or assistance would be highly appreciated...

    many thanks
    Axsal -

    1. Sorry for the inconvenience. Please post this question at the caloibre editor forum on mobileread at as it is better suited for detailed help.