Fitz vs PyMuPDF: Are They the Same Library? (2026 Guide)
If you have written any Python code against PDFs, you have almost certainly typed import fitz and wondered why a library called PyMuPDF imports under a completely different name. It is a common enough question that it generates its own search traffic — and the short answer is: fitz and PyMuPDF are the same library. There is no fork, no rename of functionality, and no reason to worry you installed the wrong package.
This guide covers where the name came from, which import statement to use in 2026, and how PyMuPDF fits into a PDF to Markdown workflow if extraction is the actual job you're trying to get done.
Fitz and PyMuPDF Are the Same Package
pip install pymupdf installs one package. Historically, the only way to use it was import fitz. As of release 1.24.3 (May 2024), you can also write import pymupdf, and both imports load the exact same code — same classes, same methods, same behavior. Nothing was deprecated, split, or renamed under the hood. If a tutorial, Stack Overflow answer, or open-source repo uses import fitz, it is working with current PyMuPDF, not an old or abandoned library.
Why Is It Called "Fitz" in the First Place?
This is the part that actually confuses people, because the internet is full of guesses. Artifex Software (the company that maintains PyMuPDF, built on top of their MuPDF engine) addressed it directly in a 2024 blog post, "PyMuPDF 1.24.3 and Farewell to Fitz." Popular theories floated in that post — a nod to F. Scott Fitzgerald, a reference to the film Fitzcarraldo, a tribute to the Fitzrovia neighborhood of London — are all just folklore. According to the answer straight from a MuPDF core developer, "fitz" comes from the old Celtic meaning of "son of." Fitz was the graphics library Artifex built for MuPDF as a fusion, a "son of," two earlier pieces of software, and the name carried over to the Python binding.
It is a fun bit of trivia, but the practical takeaway is simple: the name is historical, not functional. It tells you nothing about version, licensing, or capability.
import fitz vs import pymupdf: Which Should You Use?
As of 2026, both work identically, but the guidance from the maintainers is clear:
- New projects: use
import pymupdf. It matches the package name on PyPI, so anyone reading your code (including future-you) doesn't have to stop and think about why apymupdfinstall imports as something else. - Existing codebases using
import fitz: no urgent action needed. Artifex has explicitly committed to backward compatibility —import fitz"will continue to work in exactly the same way as the new import," with no deprecation timeline announced.
If you're starting fresh, there's no reason to introduce fitz into new code. If you're maintaining a project that already uses it, there's equally no reason to do a find-and-replace migration just for its own sake.
# Both of these give you the exact same library
import fitz # legacy import, still fully supported
import pymupdf # current recommended import, same package
What PyMuPDF (Fitz) Is Actually Used For
Once the naming question is out of the way, PyMuPDF is worth knowing about because it's one of the fastest PDF libraries available in Python — built on the C-based MuPDF engine rather than pure Python. Common uses include:
- Extracting text and layout from PDFs for search or analysis
- Rendering PDF pages to images
- Pulling embedded images out of documents
- Building PDF-to-Markdown pipelines for RAG and LLM context
If your use case is that last one — getting clean Markdown out of PDFs rather than working at the PyMuPDF API level directly — it's worth comparing PyMuPDF against the other common choices. We've covered this in detail in pypdf vs PyMuPDF and pdfplumber vs PyMuPDF, including speed, table-extraction quality, and Markdown output fidelity.
The License Question Nobody Should Skip
Before you commit to PyMuPDF (under either import name) for a commercial product, understand the licensing. Per PyMuPDF's own documentation, the library is dual-licensed: AGPL-3.0 for open-source use, or a commercial license from Artifex (pricing is not published — you contact Artifex directly for a quote) if AGPL's copyleft terms don't work for your product. This trips up more teams than the naming question does, since AGPL has real implications if you're shipping PyMuPDF inside a SaaS product. We break down exactly what that means in Is PyMuPDF Free for Commercial Use?.
When to Skip the Library Entirely
Writing and maintaining PDF-extraction code — regardless of which library or import you choose — is only worth it if you need low-level control: custom rendering, page-by-page manipulation, or embedding extraction logic inside a larger Python application.
If what you actually need is clean Markdown from PDFs, DOCX, XLSX, PPTX, or a dozen other formats, without managing library versions, AGPL compliance, or table-extraction edge cases, file2markdown does that conversion for you — in the browser or via API — and hands back Markdown that's ready to drop into a RAG pipeline or chunker. It's a faster path for teams that want the output, not the library management.
Frequently Asked Questions
Is fitz deprecated in favor of pymupdf?
No. import fitz still works exactly the same as import pymupdf and Artifex has stated they will continue supporting it. There is no deprecation warning or removal timeline for the fitz import.
Why does PyMuPDF import as fitz?
Per a MuPDF core developer's explanation, published by Artifex in 2024, "fitz" comes from the old Celtic word meaning "son of" — the MuPDF graphics library was originally a fusion of two other software components, and the Python binding inherited the name. It's unrelated to F. Scott Fitzgerald or any other popular guess.
Is PyMuPDF free for commercial use?
PyMuPDF is available under AGPL-3.0 for open-source use, or a separate commercial license from Artifex for products that can't comply with AGPL's copyleft terms. Pricing for the commercial license isn't published; you'd need to contact Artifex directly. See our full breakdown of what AGPL actually requires.
Do I need PyMuPDF if I just want Markdown from a PDF?
Not necessarily. PyMuPDF is a library you write code against — useful if you need custom extraction logic. If you just need a PDF converted to clean Markdown, a tool like file2markdown skips the library setup and licensing considerations entirely.
The Markdown Memo
A fortnightly note for lawyers, researchers, accountants, and anyone else drowning in PDFs, scans, and decks. No spam.