Skip to content

merg357/kdp-book-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

KDP Book Formatter

Automatically format your Word manuscript for Amazon KDP — print-ready PDF + Kindle ePub in 5 minutes.

🚀 Live Tool

kdp-book-formatter.netlify.app — Upload your .docx, pay $25, get both files emailed to you.

What It Does

Upload a .docx manuscript and receive:

Output Spec
Print PDF 6×9 inches, 0.875" margins, Liberation Serif 11pt
Kindle ePub NCX ToC, chapter nav, metadata
Title Page Title + author name
Copyright Page AI-generated via Inception Mercury-2
Table of Contents Built from Heading 1/2 styles
Page Numbers Start at chapter 1

KDP Formatting Requirements (Reference)

Amazon KDP requires very specific formatting that most authors don't know about:

Paperback Interior

  • Page size: 6" × 9" (most common), 5.5"×8.5", 8.5"×11"
  • Margins: 0.875" all sides (spine margin increases with page count)
  • Font: Times New Roman, Garamond, Georgia, or equivalent
  • Font size: 11pt–12pt body
  • Line spacing: 1.15–1.5x
  • First line indent: 0.3"–0.5" (no extra space between paragraphs for fiction)
  • Page numbers: Required, typically bottom center, starting at chapter 1
  • File format: PDF

Kindle eBook Interior

  • File format: ePub3 (preferred) or mobi
  • ToC: Must have NCX navigation table of contents
  • Images: Must be 72dpi+, max 127KB each recommended
  • No page numbers in eBook version

Common KDP Upload Errors

  • "Your file has formatting issues" → margins outside bleed area
  • "Please embed all fonts" → font not embedded in PDF
  • Spine too narrow → need 24+ pages for spine text

Tech Stack

Built with Python:

  • python-docx — parse Word documents, extract styles & content
  • reportlab — two-pass PDF generation (first pass for page counts, second for real TOC)
  • ebooklib — ePub3 creation with NCX navigation
  • Pillow — image extraction and scaling
  • Inception Mercury-2 (mercury-2) — AI-generated copyright text ($0.25/M tokens in)
  • OpenRouter / Groq / OpenAI — fallback AI cascade

Limitations / Roadmap

  • Custom page sizes (currently 6×9 only)
  • Cover design integration (Printify/Printful POD)
  • Multiple chapter style detection improvements
  • Hardcover spec support
  • Spanish/French language support

Self-Publishing Resources


Hosted SaaS tool at kdp-book-formatter.netlify.app

About

Auto-format Word manuscripts for Amazon KDP — print PDF + Kindle ePub in 5 minutes. $25/book via hosted web app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors