Saturday, March 2, 2013

How to Use KindleGen to Make a Mobi Book File

I must see a dozen posts per month asking about using KindleGen. Here's how to use it although I highly recommend just dragging and dropping your book file onto Previewer's face instead. (You can also drag and drop your file onto "kindlegen.exe" to convert it.)

1) Download the kindlegen_win32_v2_8.zip file to your desktop. You can find it here:

http://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211

2) Open your C-drive directory. The easiest way to get to your C-drive is to double click on Computer on your desktop (or My Computer if you're using an OS older than Windows 7.)



Then double click on Local Disc (C).

 
 

You'll see other folders in there such as Program Files, Users, Windows etc.


Make a new folder in this directory and call it KindleGen.


3) Shrink the C-drive window down and go back to the zip file on your desktop and double click to open it. (There's no need to extract it.)

4) Copy the file in there called: kindlegen.exe and paste it into that new KindleGen folder we just made in the C-drive directory. While you're still in the new KindleGen folder, make another folder inside it called: Book

 

5) So now you have a KindleGen folder on your C-drive and inside is the kindlegen.exe file and the Book folder. Find an HTML, ePub, or OPF file that you wish to convert into a Mobi book and paste it into that Book folder. Of course, if it's an OPF file you're pasting, then you'll also need all the other folders and files that go with the making of the book such as the NCX, ALL HTML files, all images, any embedded fonts etc.

6) Go to All Programs\Accessories and open Command Prompt.

7) Copy the following and then right-click beside the cursor in Command Prompt and paste it in. (Control V doesn't work in Windows 7.) Make sure to change "your_book" to whatever the name of the file is you have in the Book folder along with the correct suffix (epub, opf, or html.):

C:\KindleGen\kindlegen.exe C:\KindleGen\Book\your_book.epub

 

8) Hit the Enter button on your keyboard. KindleGen will convert the book and place the new Mobi file inside the Book folder.

9) KindleGen will use the standard c1 compression unless you tell it otherwise. The other choices are c0 (no compression) or c2 (the most compression.) To use c0 or c2, paste in one of the following:

C:\KindleGen\kindlegen.exe -c0 C:\KindleGen\Book\your_book.epub

C:\KindleGen\kindlegen.exe -c2 C:\KindleGen\Book\your_book.epub

The other commands available through KindleGen simply aren't worth messing with because you can do them better and easier without KindleGen. For instance, you can force KG to change all your jpg images to gif. Or you can force it to give a new name to the Mobi file it outputs. And honestly, the three compression schemes produce files that aren't very different in size at all. It might be worth using c2 compression once in a great while if you have a large book that's just barely over (let's say) 2MB in size and you'd like to keep it under 2MB in order to avoid an extra 15-cents in Amazon's delivery fees.

And obviously you can name your Book and KindleGen folders something else and put them somewhere other than the C-drive once you have this directory stuff down. You can also delete the zip file now and all the files inside it. They're all useless except for the kindlegen.exe file that we already copied.

That's about it. Now really, isn't it a lot easier just to drag and drop the file you want to convert onto Previewer?

18 comments:

  1. Many thanks! Amazon let me know my book was showing errors and asked me to use this Gen but it's been years since I've used this language and frankly, was never nerdy enough to master it. You helped a lot!

    ReplyDelete
    Replies
    1. Glad it helped. If you check back in a couple of days, I'll also have a 1-hour video tutorial on using a very nice and inexpensive program called Jutoh to make eBooks with.

      Delete
  2. I cannot thank you enough for this step by step explanation! I have been pulling my hair out for days trying to use Kindlegen to convert my file and I could not figure out how to do it because I do not have command prompt or html experience. I searched youtube videos, KDP community help threads, google searches and nothing helped me until I found your blog through a google search. THANK YOU, THANK YOU, THANK YOU!!!!! You have really saved me and my sanity.

    ReplyDelete
  3. I'll be putting up a how-to on getting an AZK file to an iPad for testing this week if anybody is interested. Using an AZK is the only way to properly see how your Mobi file will look on an iPad or iPhone, and Amazon's instructions for doing this are very unclear.

    ReplyDelete
  4. I'm lost. I downloaded and installed KindleGen and KindlePreviewer hoping to be able to convert my .doc file to something usable for self-publishing my book (.mobi??) I thought that these would do that, but now I'm not so sure. Any advice you can offer would be great. Thanks.

    ReplyDelete
    Replies
    1. So, I just used convertio to convert my .doc to .mobi. Now what?

      Delete
    2. KindleGen doesn't work with .doc files. It's an advanced conversion program only to be used by people with some working knowledge of HTML and CSS.

      I've never heard of Convertio. Test your Mobi file in KindleGen Previewer and see how it looks in all the book modes (except iOS devices.) If it looks the way you want it to, go ahead and upload it.

      Delete
  5. After I converted and viewed in KindlePreviewer, I read Kindle's 90 page manual and wondered if I would have been better off in html (where I have a teensy bit of knowledge). It seems my font didn't carry over. Plus there's a lot of detail about paragraph indents, page numbering, and other stuff that it looks like I have no control over in the method I've selected. It's not good enough that I actually finished writing a book....now I have to deal with all this. Ugh. I'll get there, eventually, but I wasn't expecting it to be this much of a challenge. I am grateful for your guidance. Thanks!

    ReplyDelete
    Replies
    1. You might want to buy Jutoh. It makes things much easier for most people, and it doesn't cost much.

      Delete
    2. Cool. Thanks for the tip!

      Delete
  6. thanks for figuring out and step by step instruction, saved me a lot of time.
    damonza

    ReplyDelete
  7. i was folowing all your instruction. but why its doesn't work? can you help me?

    ReplyDelete
  8. It does work. You must be doing something wrong.

    ReplyDelete
  9. How do you use the kindlepreviewer to convert a azw3 to mibi? i did it before but for the life of me I can't remember how and I've been trying to do it again but no luck so far.

    ReplyDelete
    Replies
    1. Try dragging the file from your desktop to the surface of Previewer while it's open. It should start converting right off.

      Delete
  10. Hi, I am trying to create a custom dictionary. Where should I start? I can't seem to find anything recent that works?

    ReplyDelete