Skip to content

TEI File Format (.tei)

A TEI file is XML marked up according to the Text Encoding Initiative's guidelines, the vocabulary digital humanities projects use to encode manuscripts, critical editions and other texts for scholarly analysis.

.teiDocuments

TEI at a glance#

Full nameText Encoding Initiative XML
File extension.tei
CategoryDocuments
DeveloperText Encoding Initiative Consortium
First released1987
MIME typesapplication/tei+xml
CompressionUncompressed
SpecificationTEI P5: Guidelines for Electronic Text Encoding and Interchange
FileFlip supportFileFlip writes this format but cannot open one

What a .tei file can hold#

These are the things a TEI file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Selectable textYes
Human readableYes
Schema or validationYes

Strengths and limitations of TEI#

What TEI does well

  • Has vocabulary for things plain HTML has no tags for: manuscript damage, editorial deletions, variant readings between copies of the same text
  • Can encode both the text and a full record of the editorial decisions made transcribing it, in one file
  • Backed by a large consortium maintaining one shared schema, so a TEI file from one project is at least structurally legible to another

Where TEI falls short

  • The full vocabulary runs to hundreds of elements, and most projects customize a subset, so a raw TEI file can be hard to read without knowing which subset is in play
  • Very few general tools render TEI directly, it almost always needs an XSLT stylesheet or a dedicated publishing tool to become readable output
  • Encoding a text properly is genuinely slow, since capturing manuscript detail is editorial work, not just markup

Encode a text in TEI when the project needs to preserve scholarly and manuscript detail, variants, corrections, marginalia, that plain text or HTML can't represent.

Convert TEI to HTML when the encoded text needs to be readable in a browser instead of processed by scholarly editing tools.

How to open a .tei file#

A .tei file opens in the programs below, grouped by the platform you are on.

PlatformPrograms that open it
WindowsoXygen XML Editor, Any XML or text editor
macOSoXygen XML Editor, Any XML or text editor
LinuxoXygen XML Editor, Any XML or text editor

TEI questions people ask#

What software opens a TEI file?

A TEI file is XML, so it opens as text in any editor, but a dedicated XML editor like oXygen validates it against the TEI schema and is what most digital humanities projects actually edit it in.

What's the difference between TEI and plain XML?

TEI is a specific XML vocabulary, a defined set of elements and attributes for encoding texts, rather than a general-purpose markup system. Every TEI file is XML, but XML on its own has no shared vocabulary for things like manuscript corrections or editorial notes the way TEI does.

Why do digital editions use TEI instead of HTML?

HTML describes how a page looks, while TEI describes what a text is: which words were struck out, which reading comes from which manuscript witness, where a scribe made a correction. A scholarly edition needs that structured detail preserved, not just rendered, which HTML has no vocabulary for.

What is TEI P5?

TEI P5 is the current version of the TEI Guidelines, released in 2007 and maintained with regular updates since. It's what people mean by TEI today, after four earlier revisions (P1 through P4) that used SGML rather than XML.

Converting TEI files#

FileFlip cannot open a .tei file, so there is nothing to convert it into here. It appears on the site as something other formats can be converted to.

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.