Skip to content
pdfconversionapi

MOBI to JPG API

POST a .mobi file to /v2/convert/mobi/to/jpg and get a JPEG of every page. At ImageResolution=90 and ImageQuality=80 the six-page sample became six 765 × 990 JPEGs, 366,055 bytes in all, from 24,854 bytes for the contents page to 94,834 for chapter 1.

Endpoint
POST /v2/convert/mobi/to/jpg
Accepts
mobi
Sample timing
91 ms median of 5 runsHow we measure
Request size
Up to 10 MB on the Free plan or 100 MB on paid plans, all files together

Request and response

Every sample below ran against the API before this page was published. Set PDFCONVERSIONAPI_KEY to your key and run it as is.

curl -sS -X POST \
  https://api.pdfconversionapi.com/v2/convert/mobi/to/jpg \
  -H "Authorization: Bearer $PDFCONVERSIONAPI_KEY" \
  -F File=@cape-merrow-light.mobi \
  --form-string ImageResolution=90 \
  --form-string ImageQuality=80 \
  -o response.json

# FileData is base64. Save the first file in converted/,
# or print the JSON error.
if jq -e '.Files' response.json > /dev/null; then
  mkdir -p converted
  name=$(jq -r '.Files[0].FileName' response.json)
  jq -r '.Files[0].FileData' response.json \
    | base64 --decode > "converted/$name"
else
  cat response.json
fi
200 OK91 ms median6 files, 357 KB
{
  "ConversionCost": 1,
  "ConversionTime": 0.091,
  "Files": [
    {
      "FileName": "cape-merrow-light-1.jpg",
      "FileExt": "jpg",
      "FileSize": 40780,
      "FileData": "/9j/4AAQSkZJRgABAgEAWgBa…"
    },
    {
      "FileName": "cape-merrow-light-2.jpg",
      "FileExt": "jpg",
      "FileSize": 24854,
      "FileData": "/9j/4AAQSkZJRgABAgEAWgBa…"
    },
    {
      "FileName": "cape-merrow-light-3.jpg",
      "FileExt": "jpg",
      "FileSize": 94834,
      "FileData": "/9j/4AAQSkZJRgABAgEAWgBa…"
    },
    … 3 more files
  ]
}

Response from our test run on 2026-11-03. ConversionTime shows the median of 5 runs. FileData is shortened here; the real response carries the whole file as base64.

The sample, converted

The same file the code sends. Download the input and the output and compare them yourself.

First page of cape-merrow-light-1.jpg, rendered by the API
Input
cape-merrow-light.mobi (29 KB)
Output
cape-merrow-light-1.jpg (40 KB)cape-merrow-light-2.jpg (24 KB)cape-merrow-light-3.jpg (93 KB)cape-merrow-light-4.jpg (84 KB)cape-merrow-light-5.jpg (85 KB)cape-merrow-light-6.jpg (32 KB)
Source
A short fictional e-book about a lighthouse keeper's year, with a cover, a map and a chart, written and drawn by us and packed as a MOBI file by our own script. (CC0-1.0). How it was made
Made by
2026-11-04, API build 9eeeb0640aba

Parameters

Send these as form fields next to the file. Names are case-insensitive. If you set one of the documented options below that we don't support yet, the request fails with a 400 that names it instead of returning a file made without it.

ParameterWhat it does
ImageQualityinteger, default 85JPEG quality. ConvertAPI documents 75; we use 85 when it is not sent. With no options at all the sample's six pages total 927,873 bytes.Values: 1–100
ImageResolutioninteger, default 150Resolution the Letter pages are drawn at: 90 gives 765 × 990, 150 gives 1275 × 1650. When sent, it is written to the JFIF header too.Values: 36–600
ImageWidthintegerFixed pixel width for every page.Values: 1–20,000
ImageHeightintegerFixed pixel height for every page.Values: 1–20,000
PageRangestringOnly some pages, for example 3 for the first chapter of the sample.Values: 1, 3-5, 4-, 2-last
PageSizeenum, default letterPaper size for the layout; e-book pages are always portrait.Values: a0–a9, b0–b5, letter, legal, ledger
BaseFontSizenumber, default 12Base text size. Because MOBI text carries no CSS, this sets body text and, in proportion, the headings.Values: 1–50 (points)
MarginTopnumber, default 40Top margin in points.Values: 0–200 (points)
MarginRightnumber, default 40Right margin in points.Values: 0–200 (points)
MarginBottomnumber, default 40Bottom margin in points.Values: 0–200 (points)
MarginLeftnumber, default 40Left margin in points.Values: 0–200 (points)
ColorSpaceenum, default defaultGrayscale or black-and-white JPEGs with one channel.Values: default, rgb, gray, monochrome
BackgroundColorstring, default whitePage color under the text.Values: Color names, #RRGGBB or R,G,B
FileNamestringBase name; files are numbered -1.jpg onward.
StoreFileboolean, default falseDownload links for 3 hours instead of base64 JPEGs.

What carries over, and what doesn't

Kept

  • Every page in the book's order: cover and title, contents, the three chapters and the colophon
  • The JPEG cover, the PNG map and the GIF bar chart from the book's image records, each on its page
  • Bold, italic, chapter headings, the indented logbook quote and the bulleted repair list
  • The UTF-8 text's curly quotes and apostrophes
  • Color detail: the JPEGs are encoded without chroma subsampling

Lost or not yet supported

  • MOBI 6 layout attributes, as on every route: centering, font sizes, paragraph indents and table borders are not drawn, so the lamp-hours table in chapter 2 has no rules and its numbers are not right-aligned.
  • A cover that lives only in the MOBI header, which is never drawn.
  • Exact pixels: JPEG is lossy. Use mobi/to/png when you need lossless pages.
  • The book's title and author metadata, which is not written into the JPEG files.
  • Clickable contents entries; the filepos links become plain text.

Limits

  • One book per request; two files return 400.
  • Requests up to 10 MB on the Free plan or 100 MB on paid plans, all files and fields together.
  • Up to 2,000 pages, and so 2,000 JPEGs, per request.
  • DRM-protected books return 422; books compressed with HUFF/CDIC return 404.
  • Files that are not MOBI books return 422 "this is not a MOBI book".
  • 120 seconds per conversion.

Where teams use it

Page previews for a MOBI back catalog

A shop or library that still lists MOBI titles can show a few page images per book. At 90 dpi and quality 80 a full page of the sample's text is under 100 KB.

Pages for slides, posts and print-on-demand proofs

Pull a single page with PageRange and drop the JPEG into a presentation, a social post or a proof sheet. The page carries the book's pictures as well as its text.

Questions

How many files will I get?

One JPEG per page after layout. MOBI page breaks (<mbp:pagebreak/>) always start a new page, so the sample has six on Letter even though some sections are short; on A6 it has 13.

Which picture formats inside the book are drawn?

JPEG, PNG, GIF and BMP image records referenced from the text with recindex. The sample's JPEG cover, PNG map and GIF chart all appear. Records in other formats are left out of the page.

Can I convert books I bought for my Kindle?

Not if they are DRM-protected: the API answers 422 "the book is DRM-protected". Unprotected MOBI files, such as ones you made yourself or got without DRM, convert.

Why is the text not centered like on my Kindle?

MOBI 6 books set centering and sizes with HTML attributes like align="center" and font size, which our layout ignores; it applies CSS, which these books do not have. The sample's title page is therefore left-aligned in the JPEG.

Convert your first MOBI file in a minute.