← Back to blog

RTL EPUB Support: Arabic, Hebrew and Persian Done Right

October 23, 2026
RTL EPUB Support: Arabic, Hebrew and Persian Done Right

RTL EPUB support exists in the standard and in the major stores, but it is not automatic. To publish an Arabic, Hebrew or Persian EPUB that turns pages and renders text correctly, you need three things: a dir="rtl" attribute in your content, page-progression-direction="rtl" on the package spine, and a test on real devices. The language tag alone does none of this.

This guide shows what to set, where to set it, what each store says, and how to check the result before you upload.

Alhora
Prepare Your EPUB With Confidence
Alhora formats eBooks and validates manuscripts against publishing standards, helping authors catch formatting issues before publication.
Visit Alhora

Key takeaways

  • Set direction with markup: dir="rtl" on the html element, plus page-progression-direction="rtl" on the OPF spine. A language tag such as xml:lang="he" does not set visual direction.
  • Unicode control characters are a fallback, not a strategy. Use the dir attribute on elements and containers first.
  • The EPUB 3.3 specification itself flags dir as under-implemented, so spot-check on real devices and apps, not only in a validator.
  • Each store has its own rules. Amazon KDP, Kobo and Apple Books all accept RTL, with different caveats.
  • Run EpubCheck and a device pass on every file, every time, and keep mixed-direction chapters in separate content documents when you can.

Table of Contents

What RTL support means in an EPUB

Right-to-left support is more than flipping text alignment. A correct RTL EPUB has to get four things right at the same time:

  1. Text direction inside each paragraph, including the order of mixed content such as numbers, English names and punctuation.
  2. Page progression, so the reader's swipe or tap moves forward in the correct direction.
  3. Metadata direction, so titles and author names in the package file display in the right order.
  4. Layout details, such as lists, tables, margins, drop caps and footnote markers that must mirror correctly.

The reading system, meaning the app or device that opens the file, decides how much of this it honors. That is why a file can look perfect in one app and broken in another.

Set the language and direction separately

A common mistake is to assume that tagging a book as Hebrew or Arabic makes it display right to left. According to the Accessible Publishing Knowledge Base from DAISY, the language tag is about things like text-to-speech behavior, while direction comes from the dir attribute and from page progression in the spine. Skip them and you get text in the wrong order, especially where RTL text meets LTR numbers or English words.

So set both, and set them on purpose:

  • xml:lang and lang for the language (for example ar, he or fa).
  • dir="rtl" for the visual direction.
  • page-progression-direction="rtl" for page turns.

The markup that does the work

The dir attribute in content documents

The DAISY guidance on text direction in HTML recommends setting dir on the html element, and again wherever the direction changes inside the document. A minimal Arabic chapter looks like this:

<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar" dir="rtl">

If one paragraph quotes an English phrase, wrap it in a span with dir="ltr" and the right lang. That keeps punctuation from jumping to the wrong side of the quote.

Page progression in the spine

Page direction lives in the package document. Kobo's EPUB specification says the page-progression-direction attribute on the spine element is what lets its devices order page turns from right to left:

<spine page-progression-direction="rtl">

Kobo also keeps backward compatibility for this attribute in EPUB 2 files. The catch: validators such as EpubCheck may warn about it in that case. That is a reason to publish EPUB 3 when you can. Our guide to EPUB 3 versus EPUB 2 and store rejections covers the trade-offs.

Direction for package metadata

DAISY also covers direction for package metadata: set the dir attribute on the package element, and on individual meta elements where needed. Without it, an Arabic title can display with its punctuation in the wrong place in a library listing.

Unicode control characters

The DAISY knowledge base advises against treating invisible Unicode direction marks as your main tool. They can flag a change of base direction, but they are a fallback. Markup with dir on the element or container is the stable approach, because assistive technology and reading engines handle it predictably.

Why you must test on real devices

The EPUB 3.3 specification marks the dir attribute as under-implemented, because reading systems often support only a single default text direction. Authors are still encouraged to set it properly. In practice, that means a validator pass tells you the file is well formed. It does not tell you the text displays correctly.

Two habits follow from this:

  • Set dir at the element level (spans, block quotes, list containers) as well as on the root, so a reading system that ignores one level may still honor another.
  • Open the finished file on every reader your audience uses. At minimum, that means a Kindle app or device, a Kobo device or app, and Apple Books.

What each store says

StoreRTL positionWhat to do
Amazon KDPPer KDP's language help, eBooks are supported in Arabic, Hebrew and PersianPick the language at title setup, upload DOC/DOCX or EPUB formatted to match the reading direction, and use the Previewer
KoboRTL page flow through page-progression-direction in the spineSet the attribute, then test page turns on a device
Apple BooksRTL and LTR through the EPUB 3 dir attribute, plus vertical writing modesUse EPUB 3, and apply dir and any writing mode deliberately
Google Play BooksAccepts EPUB uploadsValidate and test in the Play Books app

Amazon KDP

KDP's help page lists eBooks in Arabic, Hebrew and Persian as supported, and paperbacks in Hebrew and Yiddish. It also lists limits. Kindle for Web does not support these right-to-left languages, and X-Ray, Word Wise and page numbers are unavailable for them. The same page says your file must be formatted to match the reading direction, and that the cover must match too. For RTL paperback covers, the front cover sits to the left of the spine. Check that page again before each launch, since store rules change.

Amazon KDP — overview diagram

Kobo

Kobo's documentation points to the spine attribute for page order. Kobo also supports several EPUB versions, with EPUB 3.3 as the current standard. For layout and accessibility checks specific to the store, see our walkthrough on Kobo EPUB formatting and testing before upload.

Apple Books

Apple's asset guide on text directions says Apple Books supports both RTL and LTR, defined with the dir attribute as in the EPUB 3 standard, and also supports vertical writing. If your book mixes horizontal and vertical text, or switches direction between chapters, the safest workflow is to split those parts into separate content documents. Many reading systems cannot switch modes inside one HTML file.

Google Play Books

Google's help page confirms that you can upload EPUB files to Play Books and read them on any device you sign in to. Treat the upload as the start of testing, not the end. For store-specific preflight, read our guide to Google Play Books EPUB requirements and EpubCheck.

A build checklist for an RTL EPUB

  1. Write in the right language from the start. Keep the manuscript in a consistent script, with fonts that carry full Arabic, Hebrew or Persian glyph sets, including any diacritics you need.
  2. Set the language and direction in every content document. lang, xml:lang and dir="rtl" on the root html element.
  3. Set the spine direction. page-progression-direction="rtl" on the spine in the OPF.
  4. Set package metadata direction. dir on package or on meta elements.
  5. Isolate embedded LTR runs. Wrap English names, URLs and numbers in spans with dir="ltr" where order matters.
  6. Mirror the layout. Check indents, bullet positions, table column order, block quote rules and drop caps.
  7. Split mixed-direction material. Put separate directions or writing modes in separate content documents.
  8. Validate. Run EpubCheck and clear errors. Our guide to fixing EpubCheck errors walks through the common ones.
  9. Test on devices. Page turns, table of contents order, search, highlights and font scaling.
  10. Check accessibility. Direction affects screen readers. The EPUB accessibility checklist covers the rest of the package.

Common failures and their usual causes

SymptomLikely causeFix
Text is right-aligned but sentences read in the wrong orderLanguage set, dir missingAdd dir="rtl" to the html element
Pages turn left to rightpage-progression-direction missing from the spineAdd rtl to the spine
Parentheses or punctuation flip sidesMixed-direction run without isolationWrap the LTR run in a span with dir="ltr"
Title shows reversed in a library listNo direction on package metadataSet dir on package or meta
Looks right in one app, wrong in anotherReading system ignores dirSet dir on inner elements too, then retest
Validator warning on spine attribute in EPUB 2Legacy compatibility useMove to EPUB 3 where the store allows

Our perspective

We build Alhora to take a finished manuscript through validation to publication, and RTL is a clear example of why validation alone is not enough. A file can pass every structural check and still display wrongly on one reader, because the W3C itself says reading systems differ here. So we treat RTL as a testing job as much as a formatting job.

Our perspective — overview diagram

Our advice has three parts. First, set direction in markup, at both document and element level, and treat control characters as a last resort. Second, validate every export against the store's rules before upload, the same way you would for any EPUB. Third, keep a device checklist and run it on every release, because stores update their readers and rules.

We also hold a firm line on AI in manuscripts: in Alhora, AI checks and flags but never writes or alters your words. That matters doubly for RTL texts, where you need to know that every character in your Arabic, Hebrew or Persian manuscript is yours. If you plan an RTL release, confirm exactly what any tool does with direction attributes before you commit to it, and test a sample chapter first.

— James

Format and validate your EPUB with Alhora

Alhora is book-formatting software for authors who want store-ready ebook and print files. It runs on Mac, Windows, Linux and ChromeOS, validates against publishing standards as you work, and exports EPUB for the major stores. A lifetime license costs £99 one-off. See EPUB formatting software for every store for how the export and validation workflow fits together, and run a sample chapter through your own device checklist before you commit a full release.

FAQ

Does Kindle support RTL EPUB files?

For eBooks, yes: KDP lists Arabic, Hebrew and Persian as supported languages, and you can upload DOC/DOCX or EPUB. The file must be formatted to match the reading direction. Kindle for Web does not support these languages, and X-Ray, Word Wise and page numbers are not available for them.

Is the lang attribute enough to make text right to left?

No. The language tag drives things like text-to-speech. Visual direction comes from dir, and page turns come from page-progression-direction in the spine. Set all three.

Do I need EPUB 3 for RTL?

EPUB 3 is the better choice, since dir is defined there and Apple Books relies on it. Kobo still honors the spine attribute in EPUB 2 files, but validators may warn. Choose EPUB 3 unless a specific store or device forces otherwise.

Why does my RTL EPUB look right in one app and wrong in another?

The EPUB 3.3 specification notes that reading systems often support only one default direction, which is why dir is flagged as under-implemented. Set direction on the root and on inner elements, then test on each reader your audience uses.

Can I mix Arabic or Hebrew with English in one book?

Yes, with care. Isolate the LTR runs in spans with dir="ltr". If you mix whole chapters or writing modes, keep them in separate content documents for the widest compatibility.

Sources