- Identify whether source structure, conversion settings, CSS, or the reader caused the damage.
- Reset Look & feel, test font rescaling, and use heuristics only when necessary.
- Use conversion logs, debug output, and Edit book for precise repairs.
- Confirm the Symptom With a Small Safe Test
- Check the Conversion Settings That Directly Affect Formatting
- Separate EPUB Problems From Viewer and Device Problems
- Use Logs and Debug Output to Find the Breaking Stage
- Repair the Converted EPUB With Edit Book
- Run a Clean Temporary Test Before Reinstalling
- Quick Fix Checklist
- Frequently Asked Questions
When a calibre conversion finishes but the EPUB contains broken paragraphs, oversized headings, unexpected fonts, excessive spacing, narrow text columns, or strange margins, the conversion process has usually exposed one of four problems: poor structure in the source file, an unsuitable conversion option, conflicting CSS, or a limitation in the app or device displaying the result. The safest approach is to identify where the formatting first becomes wrong, change one relevant setting, and test again. This guide focuses on general reflowable EPUB formatting, not the separate challenges involved in converting PDF files.

Start with free Canva bundles
Browse the freebies page to claim ready-to-use Canva bundles, then get 25% off your first premium bundle after you sign up.
Free to claim. Canva-ready. Instant access.
1. Confirm the Symptom With a Small Safe Test
Before adjusting several controls, confirm whether the problem is in the EPUB itself or only in the program displaying it. Keep the original source file unchanged and create a separate test conversion. If possible, use one book that converts badly and one known-good EPUB or AZW3 book as a control.
1.1 Inspect the source before converting
Open the source in an application that handles its native format. Check several normal paragraphs, a chapter heading, a scene break, and any passage where the layout changes. Look for hard line breaks inside paragraphs, tabs used as indents, repeated blank paragraphs, manually inserted spaces, inconsistent font sizes, or text placed in tables.
These defects matter because calibre converts the source into an intermediate HTML-based structure before creating the EPUB. If the source represents every printed line as a separate paragraph, the EPUB may preserve that structure even though the text should reflow continuously.
A successful source check shows that ordinary paragraphs are real paragraphs, headings use consistent styles, and spacing is controlled by styles rather than repeated blank lines or spaces. If the source is already malformed, stop changing output profiles and correct the source first when practical.
1.2 Convert with restored defaults
Select the book, choose Convert books, set the output format to EPUB, and use the Restore defaults control in the individual conversion dialog. calibre remembers conversion settings separately for individual books, so an old experimental setting may continue to affect later attempts even when the general preferences appear correct.
Run the conversion without enabling heuristic processing, custom CSS, forced font changes, or unusual margin values. Review the result in calibre's viewer and at least one other EPUB reader if available.
Success means that the clean conversion has normal paragraph flow, readable font proportions, and consistent margins. If it does, the original failure was probably caused by a saved conversion option. Stop there and reintroduce only settings that solve a specific need.
1.3 Test a known-good EPUB or AZW3 source
Convert a well-formed EPUB to EPUB, or a well-formed AZW3 file to EPUB, using restored defaults. This is not meant to improve that book. It is a controlled test of calibre's conversion pipeline.
If the known-good source converts correctly but a DOCX, RTF, HTML, or other source does not, calibre is probably working and the problem is source-specific. If several clean EPUB or AZW3 sources develop the same defect, investigate saved conversion options, plugins, viewer overrides, and output profiles.
Do not use a PDF as this control test. PDF stores a fixed page appearance rather than a clean reflowable document structure, so it introduces different conversion problems that can obscure the diagnosis.
2. Check the Conversion Settings That Directly Affect Formatting
Most cases of calibre EPUB conversion formatting being broken can be traced to Look & feel, Page setup, heuristic processing, or settings remembered for the individual book. Metadata, email delivery, and Content server settings do not normally rewrite paragraph CSS during conversion. Investigate those areas only if the correct file is not reaching the reader.
2.1 Review Look & feel settings
Open the individual conversion dialog and inspect Look & feel. Pay particular attention to Fonts, Text, Layout, Styling, Transform styles, and any Extra CSS. Restore defaults first if you cannot explain why a value was changed.
- Wrong font sizes: Reset Base font size and Font size key, or disable font-size rescaling for a carefully designed source.
- Wrong font family: Remove an unwanted embedded-font choice or filter conflicting font-family declarations.
- Bad margins: Clear experimental Extra CSS and inspect Page setup values.
- Unexpected alignment: Preserve the original justification unless you intentionally want left-aligned or justified text.
- Cramped lines: Return line height to its default instead of forcing a universal value.
Font-size rescaling attempts to normalize the different sizes in a book according to the selected base size, size mapping, and output profile. It can improve inconsistent source files, but it may distort a source whose typography is already carefully structured. Compare one conversion with normal rescaling and one with rescaling disabled. Keep the option that preserves a sensible relationship between body text, headings, notes, and captions.
Success means readers can change the text size normally while headings remain distinct and secondary text remains readable. Once the hierarchy looks correct in more than one reader, stop adjusting the font map.
2.2 Fix paragraph spacing deliberately
The option to remove spacing between paragraphs is useful when the source uses bottom margins on every paragraph but you prefer first-line indents. It is not a universal repair switch. If the book depends on spacing for letters, quotations, lists, or scene changes, applying it globally can flatten meaningful visual breaks.
Test the option on two or three chapters. Inspect ordinary paragraphs, the first paragraph after each heading, scene breaks, block quotations, and lists. If paragraphs become an undifferentiated wall of text, restore the previous setting.
If the source contains empty paragraphs rather than CSS margins, removing paragraph spacing may not solve the problem. Those empty elements may need to be cleaned in the source or with Edit book after conversion.
Success means normal body paragraphs follow one consistent convention, either visible spacing or indentation, while scene breaks and special blocks remain recognizable.
2.3 Check Page setup and the output profile
Page setup influences dimensions, default font scaling behavior, image resizing, and margins. For a general EPUB that will be used across modern reading apps and devices, begin with an appropriate generic output profile rather than choosing a profile for an unrelated older device.
Reset unusually large left and right margins. Remember that margins may also come from the source CSS, so changing only the conversion margin fields may not override every rule. Avoid stacking device margins, document margins, and reader-app margins until the text is squeezed into a narrow column.
Success means the text uses a comfortable portion of the screen at the reader's default margin setting. If only one device still shows wide margins, check that device's reading controls before modifying the EPUB again.
2.4 Remove conflicting custom CSS and transformations
Extra CSS has high priority and can override source formatting throughout the book. A rule added months ago to fix one title can damage another. Look for broad selectors such as rules applied to every paragraph, body element, heading, or image.
Also inspect Filter style information, Transform styles, and Transform HTML. Filtering margin, padding, font size, or font-family properties can be useful when a source contains stubborn styling, but removing too much can erase legitimate distinctions.
Disable custom rules and convert again. If the clean result works, add back only the narrowest rule needed. For example, target a specific class instead of every paragraph whenever possible.
Success means the defect disappears without damaging chapter headings, quotations, lists, or captions. At that point, do not add more global CSS merely to make the book match one viewer's preferences.
2.5 Treat heuristic processing as a targeted repair
Heuristic processing tries to recognize patterns associated with poorly formatted documents. It can unwrap hard line breaks, repair indents, remove repeated blank paragraphs, and detect other structural patterns. Because it relies on pattern recognition, it can also produce false positives.
Leave heuristics disabled for a structurally sound EPUB, AZW3, DOCX, or HTML source. Consider enabling it when the source demonstrably contains hard-wrapped lines, blank paragraphs between every paragraph, or indents made from repeated spaces. Test one function at a time when the interface allows it.
Success means the targeted defect is corrected without merging separate paragraphs, altering scene breaks, or changing intentional hyphenation. If the output becomes less accurate, disable heuristics and repair the source or converted EPUB directly.
3. Separate EPUB Problems From Viewer and Device Problems
An EPUB can be structurally sound while one app displays it badly. Reader software may apply its own fonts, margins, themes, line spacing, or publisher-style overrides. A device may also support only part of the CSS used by the book.
3.1 Compare multiple renderers
Open the converted EPUB in calibre's viewer and another reputable EPUB reader. If practical, also test it on the intended device. Use neutral reader settings during the comparison by disabling custom themes, user stylesheets, forced fonts, and unusually large margin controls.
If the book is correct in two readers but wrong in one, treat the issue as a renderer or reader-preference problem. Rebuilding the EPUB repeatedly may create new defects without fixing that application.
If calibre's viewer alone looks wrong, inspect its Styles preferences for custom CSS that applies to every book. If the EPUB looks correct in calibre but wrong on a device, check whether the device is overriding publisher fonts or failing to support a layout feature.
3.2 Check the actual file delivered to the device
Make sure the device contains the new EPUB rather than an older copy with the same title. Remove the test copy through the normal device interface, disconnect safely, reconnect, and send the freshly converted format again. Some reading systems cache book styling or retain imported copies independently of calibre.
If you use Save to disk, email delivery, a wireless transfer tool, or the Content server, confirm the filename, format, modified time, and destination. Email and server settings generally do not alter EPUB CSS, but they can cause you to inspect the wrong edition or format.
Success means the file on the device matches the newly generated EPUB and displays the same correction seen on the computer.
3.3 Consider cloud sync, permissions, and security software
Operating system permissions rarely cause only bad paragraph spacing, but they can prevent calibre from replacing an old output, writing debug files, or saving editor changes. Confirm that your user account can write to the selected temporary and export folders.
Avoid editing or testing a library that is actively synchronized by a cloud-storage application. Concurrent synchronization can lock or duplicate files. Pause synchronization during the test, but do not manually rearrange files inside the calibre library folder.
Firewall rules are not relevant to local conversion formatting. They matter only when testing Content server delivery. Antivirus interference is worth investigating only if jobs fail, files vanish, or calibre reports access errors. Do not disable security software broadly just because margins look wrong.

4. Use Logs and Debug Output to Find the Breaking Stage
When visual comparisons do not identify the cause, calibre's conversion log and debug output can show the exact settings and intermediate HTML used during conversion.
4.1 Read the conversion job details
After converting, open the Jobs panel and double-click the completed conversion job. Near the beginning of the log, review the actual options used. This is especially useful because per-book settings can override the defaults in Preferences.
Look for unexpected heuristic options, font rescaling, custom CSS, style filtering, input or output profiles, and non-default margins. Warnings about malformed markup, missing resources, unsupported constructs, or inaccessible fonts can also point to the source of the defect.
Success means you can connect the symptom to a specific option or warning. Change that one factor and rerun the same test rather than changing several unrelated preferences.
4.2 Generate conversion debug output
In the conversion dialog, use the debug option and select a new empty folder. calibre can save intermediate stages of its conversion pipeline, commonly including input, parsed, structure, and processed content.
- input: Shows what the input plugin extracted from the source.
- parsed: Shows the content after preprocessing and conversion to XHTML.
- structure: Helps reveal changes made during structural detection.
- processed: Shows content shortly before it reaches the output plugin.
Open the corresponding chapter files in each stage and compare the first place where the formatting becomes wrong. If every printed line is already a separate paragraph in the input folder, the source or input interpretation is responsible. If the structure is correct until the processed stage, examine Look & feel, heuristic, and CSS transformation settings.
Debug output is diagnostic material, not a replacement calibre library. Store it in a temporary folder outside the library. Success means you have identified the first pipeline stage containing the defect.
4.3 Use calibre-debug only when normal logs are insufficient
The calibre-debug command can launch calibre components in debug mode and print additional diagnostic information. It is mainly useful when the graphical application crashes, a plugin interferes with conversion, or support documentation asks for a debug trace.
Most formatting problems do not require command-line work. Begin with job details and conversion debug output because they expose the information most directly related to EPUB transformation. If you do use calibre-debug, reproduce the issue with one test book and save the terminal output.
5. Repair the Converted EPUB With Edit Book
When only one title is affected and repeated conversion settings cannot safely repair it, editing the resulting EPUB can be faster and more precise than forcing a global conversion rule.
5.1 Inspect HTML and CSS
Right-click the converted EPUB and choose Edit book. Use the preview and Live CSS tools to inspect a broken paragraph. Check which rules set margin, padding, text-indent, font-family, font-size, line-height, or white-space.
Common problems include several stylesheets defining the same property, inline styles overriding the main stylesheet, paragraph classes inherited from the source, and fixed dimensions unsuitable for small screens.
Make a small correction, preview it, and inspect several chapters before applying a broad replacement. Use Check book to locate markup errors, missing resources, and certain font problems. The editor's preview is helpful, but the final EPUB should still be tested in the target reader.
5.2 Compare the converted book with the original
When converting EPUB to EPUB, calibre can retain the original as ORIGINAL_EPUB. The comparison tool can show differences in text, styles, and internal files. This helps determine whether conversion introduced a rule or merely preserved problematic source CSS.
Success means the repaired EPUB passes the editor's relevant checks, looks consistent in multiple chapters, and behaves correctly in the intended reading app. Once those conditions are met, stop reconverting it.
6. Run a Clean Temporary Test Before Reinstalling
Reinstalling calibre rarely repairs one malformed book because conversion settings, source defects, and library data can remain unchanged. A clean temporary test is more informative and carries less risk.
- Copy one unprotected test source to a normal local folder outside the calibre library.
- Create a temporary library or separate test environment.
- Add only that source file.
- Disable optional third-party plugins for the test if plugin interference is plausible.
- Convert to EPUB with restored defaults and no custom CSS or heuristics.
- Open the result in two readers.
- Change one relevant option and repeat only if the symptom remains.
If the clean test works, compare its conversion log and options with the original library's job. The difference may be a stored per-book setting, plugin, viewer stylesheet, or stale output file. If it fails in exactly the same way, source quality or a reproducible conversion behavior is more likely.
Do not delete the main library, manually edit its internal folders, or make mass conversions during diagnosis. Keep backups before modifying valuable books.
7. Quick Fix Checklist
- Keep the original source and create a separate test conversion.
- Restore the individual book's conversion settings to defaults.
- Test the EPUB in at least two reading applications.
- Confirm the device received the newly converted file.
- Reset experimental Look & feel and Extra CSS settings.
- Compare font rescaling enabled versus disabled.
- Use remove paragraph spacing only when source margins are the problem.
- Keep heuristic processing off unless a specific source defect requires it.
- Check Page setup for unsuitable profiles or excessive margins.
- Review the completed job log for the actual options used.
- Generate debug output to locate the first broken pipeline stage.
- Use Edit book for isolated HTML or CSS repairs.
- Test with a known-good EPUB or AZW3 source before blaming calibre.
- Run a clean temporary test before reinstalling or deleting anything.
8. Frequently Asked Questions
8.1 Why does calibre put blank space between every paragraph?
The source may define a bottom margin for each paragraph, contain empty paragraph elements, or have conversion settings that insert spacing. Test the remove spacing between paragraphs option, but inspect scene breaks and quotations afterward. If empty HTML elements cause the gaps, clean them in the source or with Edit book.
8.2 Why are fonts or headings much larger after conversion?
Font-size rescaling, the selected output profile, the base font size, or inconsistent source styles may be changing the hierarchy. Restore defaults, then compare one conversion with normal rescaling and one with rescaling disabled. Keep the result that maintains readable body text and proportionate headings across more than one reader.
8.3 Should I enable heuristic processing?
Enable it only when you can identify a defect it is designed to address, such as hard-wrapped lines or repeated blank paragraphs. Heuristics can misinterpret legitimate formatting, so compare the output carefully and turn the feature off if unrelated text changes.
8.4 Why does the EPUB look correct in calibre but broken on my device?
The device may override fonts and margins, cache an older file, or support the book's CSS differently. Reset the device's reading preferences, confirm the new file was transferred, and test another EPUB reader. If the EPUB works elsewhere, focus on the device rather than repeatedly changing conversion options.
8.5 Can metadata cause broken paragraphs or margins?
Normal title, author, series, and cover metadata does not control body paragraph layout. Metadata can affect identification, sorting, covers, and filenames, but broken spacing and fonts usually come from source structure, CSS, conversion options, or the renderer. Verify metadata only if you suspect you are opening the wrong edition.
8.6 Is reinstalling calibre the best fix when calibre is not working?
Not for an isolated formatting problem. First restore per-book defaults, inspect the job log, test a known-good EPUB or AZW3 source, and run a clean temporary conversion. Reinstallation becomes reasonable only when the application itself is damaged, fails to launch, or shows the same abnormal behavior in a clean test environment.