Menu Search
Jump to the content X X
Smashing Conf San Francisco

We use ad-blockers as well, you know. We gotta keep those servers running though. Did you know that we publish useful books and run friendly conferences — crafted for pros like yourself? E.g. upcoming SmashingConf San Francisco, dedicated to smart front-end techniques and design patterns.

How To Make An eBook

Making an eBook is easy, regardless of your coding experience. This is good, because 99.9% of your time should be spent on writing and getting your book out there, rather than on technology.

EPUB And Kindle Link

Any electronic book can be called an eBook, but because over 90% of all eBooks are read on Amazon’s Kindle, Apple’s iOS devices (iPad, iPhone and iPod) and the Barnes & Noble Nook, I’ll focus on the formats for those platforms:

  1. EPUB
    This is an open standard adopted by Apple (iOS), Barnes & Noble (Nook) and many other makers of eBook readers (such as Sony). Thankfully, Amazon has said that its next Kindle will also support EPUB, but the newest version of Kindle doesn’t support it. (Update: Unfortunately, Amazon has decided NOT to support EPUB in the next version of their Kindle.)
  2. Kindle
    This is a proprietary format that Amazon uses for its Kindle, which is a modification of the Mobipocket format.
  3. PDF
    PDF is inherently made for print and doesn’t display well on digital devices. But if you really need to get data out to an iOS or Android device now, then it’s a useful format. We’ll have to wait one more generation for the Kindle to support it. (Update: Kindle DOES support PDF.)

Aside to geeks: The current version of EPUB is based on XHTML 1.1, which was officially proposed in 1999. That was the year when Internet Explorer 5.0 was released and grabbed over 50% of browser market share from Netscape Navigator. This is great because XHTML is an open standard that many developers know; unfortunately, it’s very old.

What Kind Of Book Makes The Best eBook? Link

EPUB was truly designed to display text, possibly with some inline images. While creating an EPUB illustrated children’s book, comic book, travel book or cookbook is possible, it’s a lot more work and doesn’t work very consistently across platforms. A good rule of thumb is that eBooks are best for books with a lot of words (think New York Times bestseller list).

How a picture book should look and how it looks in EPUB. Novels don’t have this problem because images don’t matter.1
eBooks don’t handle pictures well.

When deciding whether your book is a good candidate for an eBook, keep in mind that the “killer feature” of eBooks, surprisingly, is their ability to increase in font size. This means that every book becomes a large-type book, which is why baby-boomers have driven the adoption of digital books over the past few years.

Also keep in mind that more than half of all eBook-reading devices are black and white, which is another reason to steer clear of picture-based books.

These demographics and format limitations will change over time. But for now, my recommendation is to make your first eBook a text-based one.

Aside to geeks: If you’re interested in making a picture book for iOS devices and aren’t afraid of code, check out Elizabeth Castro’s excellent guide2 on how to code a fixed-layout EPUB file.

Making Your First eBook Link

The easiest way to make an eBook is to outsource it. A number of services, such as Lulu and Smashwords, will translate your Word document into an EPUB fairly inexpensively. These services have relationships with Amazon and Apple (as well as other digital bookstores) and will not only create your digital eBook but submit it to these bookstores for a small fee. For more information on choosing a service, see Christine Mark’s guide on choosing an EPUB publisher3.

If you want to sell your book only in Amazon’s Kindle Store, you can convert your Word file for free by submitting it yourself to Amazon’s Kindle Direct Publishing4 (KDP). Creating an account is free, and the service is easy to use.

If you’re mostly interested in Apple’s eco-system, then you probably already have a copy of Pages on your machine (if not, you can get it for $20). Pages is Apple’s version of Microsoft Word and has a simple and effective EPUB export option. To create your book, simply make the first page your book’s cover, use section breaks between chapters, and then select FileExportEPUB.

Using Pages to make an EPUB book5
In my experience, Pages’ EPUB exporting is rock-solid.

If you don’t have a Mac or want to convert to more formats, your best choice of software is Calibre116. Calibre is relatively easy to use and does a good job of converting from many standard formats (including Microsoft Word) to the top eBook formats (EPUB and the Kindle’s Mobipocket format). You can download Calibre for free. Alternatively, if you need to convert only to Kindle, Amazon provides free conversion software called Kindlegen7.

Another common choice for building eBooks is InDesign, but I’d recommend that you steer clear from it until you have a few eBooks under your belt. Even though it technically can export to EPUB and Kindle formats, it’s a bit clunky and adds a lot of crud. More importantly, InDesign was built from the ground up to handle print, so it encourages you to think in print metaphors, which don’t always apply to eBooks and which will lead to layout problems. In our experience, programming your own EPUBs by hand is easier. Even still, I don’t recommend it…

Coding By Hand Link

If everything said above sounds too easy and you’re looking for a challenge, another option is to code your EPUB by hand. This feels like programming in a time warp. EPUB is built on such an outdated version of XHTML that half the time you’ll be reminding yourself that everything in the EPUB must be declared in the manifest file (really?), while the other half of the time you’ll be recalling how you used to program HTML in the ’90s.

If you’re still not convinced and have a pressing desire to learn how to code an EPUB by hand, you have two options:

  1. Grab an EPUB from the Web that doesn’t have any DRM in it. Change the extension from .epub to .zip and unZip it (you may need to use Stuffit Expander if you’re on a Mac). Now you’re free to hack away at the file and see what happens. Keep in mind that every file in the EPUB must be in the manifest (package.opf). There are a couple of books you can pick apart to get started (including my best-selling children’s book, which you can get for free on my website or buy from the Apple bookstore to show your love).
  2. Check out “EPUB Straight to the Point178” by Elizabeth Castro, and she’ll walk you through it.

The typical structure of an EPUB file.

The container.xml file, MIME type, and folder structure are pretty standard for all books. Images can be in PNG, JPEG, GIF or SVG format. I usually stick with PNG, with JPEG as a fall-back.

The epb.ncx file is the table of contents and is pretty straightforward.

The epb.opf file is the manifest where you set the meta data (title, author, ISBN, etc.), but it’s also where every other file in the EPUB is declared. Every image, HTML or CSS file must be listed here. It’s a pain in the butt and one reason why I personally avoid hand-coding EPUB if possible.

The CSS is pretty much what you’d expect, although a very limited subset.

The HTML is also very straightforward. Below is a sample of the HTML that Apple Pages spit out for my book. As you can see, it’s not very pretty (<div class="s6"> instead of a simple <h1>), but it’s functional and easy to understand.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html



<html xml:lang="en" xmlns="">


<title>1 Moving Day | Ghost Hunters - Book 1 The Haunted House</title>

<link rel="stylesheet" href="css/book.css" type="text/css"/>

<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/><meta name="EPB-UUID" content="3B0A6B89-F890-4843-AA2A-01C27CE8D573"/>



<div style="white-space:pre-wrap">

<div>CHAPTER 1</div>

<div>Samantha and Dylan looked eagerly out the car window. Today was the day that they were moving to their new house. They were both excited, but sometimes a look of worry would cross Sam’s face.</div>




If you are creating your own EPUB, be sure to validate it with Threepress’ validator10, and consider using Calibre116 to convert your EPUB to a Kindle-friendly format.

The Future Of EPUB Link

EPUB 3.0 holds a lot of promise and includes the following changes (many of which Apple has already adopted):

  • Support for HTML5 (yay!) and CSS 2.1;
  • Various structural changes to file names and locations;
  • Support for embedded fonts, audio and video, as well as media overlays and triggers and scripts.

Unfortunately, EPUB 3.0 doesn’t support illustrated books, so we can expect to see some fragmentation as Apple and other vendors innovate around these limitations.

Olivia was one of the first fixed-layout EPUB books released by Apple. Also pictured is the bestselling fixed-layout EPUB book The Girl Who Wouldn’t Wash Her Hands.

With the next version of Kindle supporting EPUB, we’ll see over the next year or two whether we wind up with an “Apple EPUB” and an “Amazon EPUB,” or a “pure” EPUB format. Ultimately, the answer will depend on how quickly the International Digital Publishing Forum (IDPF) can finalize its standards.

Of course, all of this speculation about the future is somewhat theoretical. If you have a book to publish now, my suggestion is don’t worry about the future; just dive right in and make it. And let me know in the comments how it turned out and what worked best for you.

Other Resources Link

You may be interested in the following articles and related resources:


Footnotes Link

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18

↑ Back to top Tweet itShare on Facebook


Jason is an educator, business owner, and author. As one of the first dozen professors of website design in the country, his lectures and workshops dynamically cater to all user levels. His company, Gravity Switch, works with higher education and innovative businesses and is the top agile web development firm in New England. Jason keeps his carbon footprint down by bicycling to work year round. He's enjoying Twitter, so be sure to shout out if you have any impossible problems. He likes to be challenged.

  1. 1

    Amazing resource, just what I needed! Thanks smashingmag! :)

  2. 2

    Your article is really good, thank’s

    I made some test files for my book because it has a lot of illustrations and I would like to shell it in Amazon, I tried with Calibre and Pages with no luck. For testing the files I upload the ePub to DropBox and then download it with an iPhone or an iPad.

    Gretings from Spain ;-)

  3. 3

    Did you know that the open source WYSIWYG HTML editor BlueGriffon is soon to release an EPUB edition?

  4. 4

    Fantastic, thanks!

    Now, how do I read an Epub on Mac OS?

    • 5

      You can read EPUB on Mac OS with Firefox extensions like Lucifox or EPUB Reader, with browser based programs like Ibis Reader, or with standalone programs like Scarlett and Adobe Digital Editions.

      (and thanks for the mentions, Jason!)

      Author, “EPUB Straight to the Point”

    • 6

      You can read most ebook formats with Adobe Digital Editions and Calibre (see article). Both available for free.

    • 7

      Scarlett, nice ePub reader for Mac OS.

  5. 8

    Great article, I’d like to mention Lyx which is a great, free open source editor. It’s amazing at exporting to all kinds of formats including HTML and PDF and perfect for writing ebooks if you like a more technical word processor than Word. It fits in nicely with Calibre which can convert from HTML to all kinds of ebook formats.

    Oh, and Kindles do currently support PDF.

  6. 9

    “With the next version of Kindle supporting EPUB”

    That’s not what the specs from yesterday say? Update?

    • 10

      lol. Good point, emerging story vs. an article I finished a few weeks ago. I’m running into nonstop meetings and haven’t had time to get the latest Amazon specs, if you have a link pls include it. :)

      • 11

        Specs for Kindle Fire are here:

        There is no mention of EPUB :(


      • 12

        Here are the formats that the new Kindles (released 28 Sep 2011) support. The following info is from the Kindle product pages:

        Kindle 4 (basic model): Kindle (AZW), TXT, PDF, unprotected MOBI, PRC natively; HTML, DOC, DOCX, JPEG, GIF, PNG, BMP through conversion. (Note there is no Audible or MP3 support)

        Kindle Touch: Kindle (AZW), TXT, PDF, Audible (Audible Enhanced(AA,AAX)), MP3, unprotected MOBI, PRC natively; HTML, DOC, DOCX, JPEG, GIF, PNG, BMP through conversion

        Kindle Fire (tablet): Kindle (AZW), TXT, PDF, unprotected MOBI, PRC natively, Audible (Audible Enhanced (AA, AAX)), DOC, DOCX, JPEG, GIF, PNG, BMP, non-DRM AAC, MP3, MIDI, OGG, WAV, MP4, VP8

  7. 14

    I would recommend using Sigil ( to edit the .epub instead of renaming and unzipping it. It’s a WYSIWYG editor, but you can also drop into code view and edit directly, all while leaving the file structure alone. It also has a built-in validator.

  8. 15

    My recommendation is to checkout pandoc to generate epub. Pandoc converts files from one markup format into another, pandoc is your swiss-army knife. Need to generate a man page from a markdown file like md to epub.

  9. 16

    Really great tips. Thanks for posting. Do you have any info on how to “test run” an epub files once its created? In the past I posted ones to my site I thought worked, but I got feedback from people saying they couldn’t open them.

    My only idea is if you have an iPad, you can test it out via iBooks. Any other ways?

    • 17

      Have you tried Calibre (

    • 18

      If you are a Firefox user, there is a plugin called “EPUBReader” that allows you to view ePub books within Firefox.

    • 19

      For better or worse I just test them in my iPhone and iPad since all readers are different and *most* people who buy or download ePubs do so from Apple.

    • 20

      “*most* people who buy or download ePubs do so from Apple”

      Nook and Kobo both use ePub, so this statement is not true. You need to test you ePubs on multiple devices, NOT just Apple. In fact, Apple’s iBook sales lag behind Kobo and Nook.

  10. 21

    Excellent resource!

  11. 22

    How does the format you choose affect its distribution? For example, could I sell a PDF book through iTunes or does Apple only allow specific formats? What will Amazon allow?

    Also, are there best practices to follow for formatting?

    • 23

      J-Ray. Apple accepts ePubs only. Kindle accepts MOBI only. Both of their readers accept PDFs, but they don’t *sell* PDFs on their bookstores. PDFs are *really* for print and can be very frustrating on mobile devices, so even if either of them accepted them I wouldn’t recommend it.

  12. 24

    What further steps would I need to take if I started with a PDF created from OpenOffice on Ubuntu Linux? And would I need a particular version of OpenOffice?

  13. 26

    As an x-web designer, I prefer using a word doc instead of using html.

    I ended up creating 8 videos on how to do it and 2 on how to upload to the sites at I thought it would be helpful.

  14. 27

    I highly recommend Scrivener for Mac and Windows as a book-writing application. It’s the best tool for non-linear writing which really should be the way authors ought to write long works instead of the restrictive MS Word. Plus it has the option to export to EPUB format. I can’t rave enough about it.

    • 28

      I totally agree with Gary.

      If you’re getting started, don’t want to deal with formatting issues and get your book out there quickly – Scrivener is your friend! It supports a great range of output formats.

      Still, you need to be very careful and must not rely on the tools too much.

      Kind regards

  15. 29

    Kindle and no PDF support?
    I am on my 4th Kindle and I have been reading PDF the entire time. So what is this no PDF crud?

    The MAIN reason I got the Kindle was PDF.

    The new one has FREE email and web. 3G that I do not pay for.

    So, check your sources, I read PDF and have done for years on a Kindle (way from the first experimental code)

  16. 30

    Great article, Jason!
    I am a big fan of Calibre. I use it to convert documents for my Sony Reader (to LRF format). It supports multiple languages and as long as the device is configured for other languages – everything works. Calibre will also add RSS feeds to the device. It does not work for my Sony Reader (no wifi support), but even then, some of my friends love the feature.

  17. 31

    Your article still states Kindle doesn’t support PDF. To my knowledge it did even prior to today’s announcement. Maybe I’m wrong.

    • 32

      It always has.

      The first version (you know the one that looks like a distopic sci-fi invention) made you send files to an email account and it would send you back an .azw right to your device. But next version was PDF-friendlier.

  18. 33


    Please consider also to mention’s tutorial on “How to Make ePub Book by Hand”. The article has been around for some time. I have learnt a lot from it since I made my first ePub “experiment”, and I love the tutorial there SOOO MUCH…

    Here is the link:

  19. 34

    We just published an epub to teach how to understand and create Polynesian tattoos, and our best companions on this journey proved to be Calibre (to make the handmade epub perfectly compliant and have it validate on Amazon and iBookstore as well), and Tweak ePub to edit single files WITHIN the .epub file without the need to rename/unzip it and then revalidate it through Calibre.
    Ebooks that make intensive use of images like ours (they were vital to us to explain symbols and their positioning) should keep them between text blocks and not within them because at the state of the art they wouln’t work well in most cases.

  20. 35

    Odd that you didn’t mention Anthemion eCub, which I use with Sigil. Great little epub creator.


↑ Back to top