EPUB Footnote & Link Doctor

About EPUB Footnote & Link Doctor

EPUB Footnote & Link Doctor is a free tool that finds broken internal links in an EPUB ebook and repairs only those links. It checks every link a reader can tap: footnote references, the back links that return from a note to the text, cross references, and the entries of the table of contents (both the EPUB 3 navigation document and the older NCX). A link counts as broken when the file it points to is not in the book, or when the anchor after the # does not exist in that file. The tool then looks for the one place the link was meant to reach. Typical causes it repairs on its own are a file name with different capital letters, a chapter that was moved to another folder, an anchor that ended up in a different file after the book was split into chapters, an old name anchor where an id is required, a footnote back link that an export left empty, and a web address missing its https:// prefix. When more than one target is possible, it never guesses: you see the candidates in a list and choose, or leave the link as it is. Only the href values of the repaired links change (and, where a footnote reference had no id, one id is added), so text, styles, images and every other file stay exactly the same. Everything happens in your browser and the book is never uploaded. To change the title, author or cover afterwards, use EPUB Metadata Editor, and to check the result on screen, open it in EPUB Reader.

An EPUB is a ZIP archive of XHTML files, and every footnote in it is a pair of ordinary hyperlinks. The reference in the text, usually a small raised number, links to an element with an id in the notes section, for example notes.xhtml#note-12. The note itself usually starts with a back link that points to the id of the reference, so the reader can return to the same spot. EPUB 3 can mark these with epub:type noteref and footnote, which lets reading apps show the note in a pop-up, but the links underneath are the same. Because a link names both a file and an id, it breaks whenever either side changes. Splitting a long chapter into smaller files moves anchors into new files while the links still point to the old one. Renaming files or folders, or changing the capitalization of a name, breaks every link to them, and many reading systems compare names case-sensitively. Text pasted from the web or from old HTML often uses name attributes for anchors, which EPUB 3 no longer accepts as link targets. Layout programs sometimes export back links with an empty href. This tool reads every content document, the navigation document and the NCX, builds a list of all ids and files in the book, and checks each link against it. For footnotes it recognizes references by their EPUB semantics or by their typical form, a short number or symbol, often in superscript, and matches each note with the reference that points to it. Repairs are written straight into the original file text rather than through a rebuilt document, which is why entities, spacing, comments and formatting survive unchanged.

How to use EPUB Footnote & Link Doctor

  1. Drop your EPUB into the box, or click to choose it. Every link in the book is checked right away.
  2. Review the automatic fixes, untick any you do not want, and pick a target for links that need your choice.
  3. Click Download fixed EPUB. Copy the report if you want a list of every change.

Frequently Asked Questions

Why do my footnote back links not work after exporting from InDesign?
InDesign and some other layout programs sometimes write the link that returns from an endnote to the text with an empty href, especially in books built from several chapter files. The footnote opens, but tapping the number in the note does nothing. This tool pairs each note with the reference that points to it and fills in the missing back link, adding an id to the reference when it has none. If a note is cited more than once, you pick which reference the back link should return to.
What do the epubcheck errors RSC-012 and RSC-007 mean?
RSC-012 means a link points to a fragment, the part after #, that is not defined in the target file. RSC-007 means the file a link points to is missing from the book. Both are exactly the broken links this tool finds. It fixes the ones with a single clear target and lists the rest, so you can run epubcheck again on the downloaded file and expect those errors to be gone.
Will it change the text or layout of my book?
No. The tool does not rewrite your files. It edits only the href value of each link you choose to repair, directly in the original file, and in a few cases adds an id attribute to a footnote reference or an old name anchor. Every other byte of text, every stylesheet, image and font stays as it was, and files without a repaired link are not touched at all.
Why does a link need my choice instead of being fixed automatically?
Automatic repair happens only when exactly one place in the book matches. If the same anchor exists in two chapters, or a note is cited twice, any automatic pick could send readers to the wrong place. In those cases the tool shows the possible targets, with a short preview of each, and keeps the link unchanged until you select one.
Will Amazon KDP or Apple Books accept the fixed EPUB?
Broken internal links are a common reason for upload warnings and rejections, and repairing them removes that cause. The tool does not change anything else, so other problems in the file, such as invalid markup or missing metadata, are not fixed here. Running the result through epubcheck or Kindle Previewer before uploading is still a good habit.
Is my book uploaded to a server?
No. The EPUB is opened, checked and repaired inside your browser with JavaScript. Nothing is sent anywhere, which matters for unpublished manuscripts and client work. DRM-protected books cannot be opened, because their content is encrypted.
Can I fix MOBI, AZW3 or FB2 files?
This tool works on EPUB files. Convert a MOBI or AZW3 book with the MOBI to EPUB Converter, or an FB2 book with the FB2 to EPUB Converter; both converters rebuild footnote links while converting, and you can then check the EPUB here.

Related Tools