Spreadsheet Signatures · Container Identification

XLSX and XLS Magic Bytes and File Signatures

Read the bytes before trusting the extension. ZIP records, compound file streams, workbook content types, and text syntax distinguish native spreadsheets from encrypted packages and disguised exports.

  • Court qualified expert witnesses
  • Former law enforcement forensic examiners
  • Hash verified chain of custody
  • Nationwide support for attorneys and clients

Home › Digital Evidence Authentication › Excel Spreadsheet Authentication › XLSX and XLS Magic Bytes and File Signatures

Quick Answer. An ordinary XLSX is a ZIP package, commonly beginning with 50 4B 03 04. A typical legacy XLS compound file begins D0 CF 11 E0 A1 B1 1A E1. These signatures identify containers, not spreadsheet authenticity. Inspect workbook parts or streams to distinguish XLSX, XLSM, XLSB, encrypted Office packages, and unrelated files. CSV has no mandatory signature.

File identification is the entry point to Excel Spreadsheet Authentication. Continue with XLSX file structure after identifying a ZIP workbook, or use CSV file authentication when the supplied file is a text export rather than a native workbook.

50 4B 03 04ZIP local file header commonly found at the start of XLSX packages.
Eight compound bytesD0 CF 11 E0 A1 B1 1A E1 identifies the compound file container.
Two encryption streamsEncryptionInfo and EncryptedPackage distinguish a common encrypted Office wrapper.
No CSV magicA text encoding marker does not identify spreadsheet records or authorship.

Spreadsheet signature questions answered

QuestionShort answer
What are the XLSX magic bytes?An ordinary XLSX package commonly starts with the ZIP local file header 50 4B 03 04. Confirm workbook content and package relationships because many unrelated formats use ZIP.
What are the legacy XLS compound file magic bytes?The compound file signature is D0 CF 11 E0 A1 B1 1A E1. A typical Excel 97 to 2003 XLS then contains a Workbook stream with BIFF8 records.
Can encrypted XLSX files start with the XLS compound signature?Yes. Common password encrypted Office packages use a compound container with EncryptionInfo and EncryptedPackage streams instead of exposing the normal ZIP package.
Does an XLSM file have different ZIP magic bytes from XLSX?No. Both use ZIP packaging. Macro enabled workbook content types and a VBA project part such as xl/vbaProject.bin distinguish typical XLSM content.
What signature identifies a CSV spreadsheet?CSV has no mandatory file signature. EF BB BF can mark UTF 8 encoding, but that marker is shared by many text files and does not establish CSV syntax.
Can an XLS extension contain HTML instead of an Excel workbook?Yes. Some exports use HTML tables with an .xls name. Identify HTML markup and report the actual format rather than treating the extension as a binary workbook signature.

Key terms defined

ZIP local header

Record beginning 50 4B 03 04 that introduces an individual ZIP member.

Central directory header

ZIP record beginning 50 4B 01 02 that indexes a member's metadata and location.

End of central directory

ZIP record beginning 50 4B 05 06 that closes the ordinary archive directory structure.

Workbook stream

Compound file stream containing binary workbook records in typical BIFF8 XLS files.

EncryptionInfo

Compound stream describing the encryption needed to interpret an encrypted Office package.

EncryptedPackage

Compound stream holding the encrypted package payload rather than readable worksheet XML.

vbaProject.bin

Binary VBA project part commonly carried by macro enabled Office packages.

EF BB BF encoding marker

Optional EF BB BF byte order marker identifying a Unicode text encoding, not CSV semantics.

Which ZIP signatures identify an ordinary XLSX package?

An ordinary XLSX is a ZIP package containing SpreadsheetML parts. The commonly observed opening bytes are 50 4B 03 04, the ZIP local file header signature. That observation establishes a ZIP structure candidate. It does not distinguish a workbook from a Word file, an archive of photographs, or another ZIP based format.

ZIP recordHex signatureRole in examination
Local file header50 4B 03 04Introduces a member and its local metadata
Central directory file header50 4B 01 02Indexes member attributes and header location
End of central directory50 4B 05 06Records directory location and archive completion information

Confirm the workbook through package relationships

Inspect [Content_Types].xml and _rels/.rels. The package relationship to the office document identifies the workbook part, commonly xl/workbook.xml. The workbook's own relationships lead to worksheets and supporting content. Filename resemblance alone is insufficient when a package is malformed or deliberately misleading.

A directory listing containing xl/workbook.xml, worksheet parts, and spreadsheet content types supports identification as a SpreadsheetML workbook. Validate the relationship targets and parse the referenced content. A file called workbook.xml inside an arbitrary ZIP is not enough. The package structure guide explains the next level of validation.

Use structure, not isolated byte matches

Do not search for 50 4B and stop at the first occurrence. Compressed data and embedded objects can contain matching byte sequences. Read record fields, offsets, lengths, and directory relationships. Compare local headers with central directory entries, and record duplicate names or members that a reader might interpret inconsistently.

The end of central directory record is near the archive end, not necessarily the final 22 bytes because a ZIP comment may follow its fixed fields. ZIP64 archives use additional structures. Truncation, appended bytes, or inconsistent offsets require a documented structural finding rather than a claim that one missing signature proves fabrication.

Does the file's actual format match its spreadsheet label?

We inspect signatures and internal members before choosing a parser or opening an attachment. This separates ordinary workbook packaging, encryption wrappers, binary formats, and text exports without assuming that a familiar extension proves native Excel content.

Request Confidential Consultation Call (833) 292 3733

How do legacy XLS and encrypted XLSX share a compound signature?

The bytes D0 CF 11 E0 A1 B1 1A E1 identify the Compound File Binary container. Typical Excel 97 to 2003 XLS files use this container, but so do other document formats and common encrypted Office packages. Enumerate the directory streams before calling the file a legacy workbook.

Container observationInternal evidenceSupported identification
Compound signatureWorkbook stream containing valid BIFF8 recordsTypical legacy binary XLS workbook
Compound signatureEncryptionInfo and EncryptedPackage streamsEncrypted Office package wrapper
ZIP signatureSpreadsheet XML workbook and matching content typesOrdinary XML workbook package
ZIP signatureBinary workbook part such as xl/workbook.binCandidate XLSB package requiring binary parsing
Readable markupHTML table structure despite an .xls nameHTML export rather than native BIFF workbook

Identify BIFF8 inside the Workbook stream

A typical BIFF8 XLS stores binary record sequences in the Workbook stream. Parse the record headers and workbook structures rather than treating the stream name as conclusive. Older Excel variants can use other stream names or formats, so the eight compound bytes are not a universal test for every historical file carrying an .xls extension.

The compound directory can also include property streams such as SummaryInformation, conventionally prefixed by a control character in its stored stream name, and DocumentSummaryInformation. These property sets can retain title, author, or application information. They are editable metadata and should be reported separately from the BIFF cell records and source attribution.

Separate encryption from worksheet protection

A common encrypted XLSX wrapper contains EncryptionInfo and EncryptedPackage. The workbook's XML is not directly available until authorized decryption succeeds. The same wrapper pattern can carry other Office package types, so an .xlsx name plus those streams does not independently establish the decrypted content type.

Record the outer file hash and encryption observations first. If credentials are supplied, preserve the decrypted output as a derived examination artifact and calculate its own hash. Identify its workbook content separately. Do not describe that derived package as byte identical to the encrypted original.

Worksheet protection and workbook structure protection are different from package encryption. They can restrict interface actions while leaving ZIP members and cell values readable. A password prompt must be interpreted in its actual context rather than assumed to mean all spreadsheet content is encrypted.

How are XLSM and XLSB distinguished when both use ZIP?

XLSM and XLSB can share the ZIP opening signature with XLSX. Identify their workbook content types and actual parts. The extension selects an expected interpretation, but the internal package records show whether that interpretation matches the supplied file.

Find macro enabled content without running it

An XLSM package normally contains an XML workbook plus macro enabled content declarations and a VBA project part, commonly xl/vbaProject.bin. Follow relationships to the project rather than searching only by filename. A project can be stored without being executed during the examination.

The presence of vbaProject.bin establishes that a VBA project is present in the package; it does not prove the project ran, changed a cell, or caused an alleged loss. Record its hash and related package declarations. If the extension says XLSX while macro project content remains, report the mismatch and the application's observed response on a controlled copy.

Recognize the binary workbook package

XLSB is a ZIP based binary workbook format. It commonly includes xl/workbook.bin and binary worksheet parts rather than SpreadsheetML worksheet XML. It is not a legacy compound XLS simply because the word binary appears in its name. A ZIP parser can inventory XLSB members but cannot interpret the cell records as XML.

Use an appropriate binary workbook parser and preserve the original package before any conversion. Saving XLSB as XLSX can change record representation, caches, metadata, and supported features. A converted file can assist review, but it is a derivative and cannot replace the collected binary workbook for structural conclusions.

Why do CSV and HTML exports defeat extension based identification?

CSV is text with no mandatory magic bytes. HTML is markup that spreadsheet applications can import. Both can be supplied under a spreadsheet looking filename without containing native Excel workbook structures. Identify encoding and syntax before deciding which evidence the file can preserve.

Interpret EF BB BF as encoding information

The bytes EF BB BF are an optional UTF 8 byte order marker. Their presence indicates an encoding convention, not CSV identity. A file with no marker can still be valid UTF 8, and CSV can use other encodings. Decode a copy under recorded assumptions and check whether characters are represented consistently.

Assess delimiters, record boundaries, quotation rules, and escaped quotes over the complete text. A comma in the first line does not establish a valid CSV dataset. Regional exports may use semicolons or other delimiters while retaining a .csv extension. Record the observed dialect instead of forcing an interpretation that silently changes column boundaries.

A text export does not carry native worksheet styles, hidden sheet states, or an XLSX formula cache model. Text beginning with an equals sign may be interpreted as a formula when imported, but the raw CSV stores characters. Preserve that raw text before opening it in a spreadsheet application that may convert dates, identifiers, or formulas.

Identify HTML tables wearing an XLS name

An export named report.xls can begin with markup such as <html> and contain table rows. Whitespace, a text encoding marker, or declarations can precede the visible markup. Parse the document as HTML rather than demanding that the first characters always be one exact tag. Spreadsheet software may open the table while warning that the extension and format differ.

HTML can preserve visible table content and formatting but does not become BIFF8 because Excel can read it. Report it as an HTML spreadsheet export with an .xls extension. An extension mismatch may reflect an ordinary reporting system's export method, not an attempt to deceive. Compare other exports from that system before drawing a conclusion about the sender.

Procedure for identifying a spreadsheet's actual format

Choose the parser from the bytes and internal structure, then document how that result compares with the supplied filename.

  1. Record the received name and opening bytes. Preserve the file, calculate its hash, and inspect an initial byte range without invoking spreadsheet macros or link updates.
  2. Validate ZIP record relationships. If ZIP is indicated, compare local headers, directory records, archive ending, member names, offsets, and sizes before extracting workbook parts.
  3. Classify workbook package members. Read content types and package relationships. Distinguish XML workbooks, macro enabled declarations, VBA projects, and binary workbook parts.
  4. Enumerate compound file streams. For the compound signature, locate valid Workbook records or encryption streams and examine property streams separately.
  5. Test text syntax and encoding. For nonbinary exports, record any encoding marker and parse CSV records or HTML tables rather than trusting the extension.
  6. Report format mismatches and derived outputs. State the actual container and content interpretation. Identify any authorized decryption or conversion output with a separate hash and provenance record.

What matters most

  • An .xlsx attachment does not expose ordinary ZIP members.
  • A reporting system distributes HTML tables with an .xls extension.
  • A compound file might be encrypted Office content rather than BIFF8.
  • A macro enabled package is presented with a macro free filename.
  • A binary workbook requires a parser different from an XML worksheet reader.

Common misconceptions

  • PK opening bytes prove that a file is XLSX. They indicate ZIP structure; spreadsheet content types and relationships establish the workbook interpretation.
  • Every compound file with an XLS name is BIFF8. Encrypted Office wrappers and unrelated compound content share the same container signature.
  • EF BB BF is a CSV signature. It is an optional UTF 8 encoding marker shared by many text formats.
  • Renaming HTML to XLS creates a native Excel workbook. The bytes remain HTML until an application actually converts and saves a different format.

When this applies, and when it does not

This applies when

  • Incoming spreadsheet attachment triage
  • Encrypted Office container classification
  • XLSM and XLSB package differentiation
  • Text and HTML export identification

This does not apply when

  • Proof that every workbook figure is accurate
  • VBA execution inferred from project presence
  • Authorship established by a file signature

How Elite Digital Forensics helps

We provide byte signatures, validated container inventories, workbook type findings, and documented extension mismatches. Encrypted and converted derivatives are identified separately so the report does not confuse supplied evidence with later examination outputs. This work is led by subject matter experts in file signature analysis who confirm whether a file is a true XLSX, a legacy XLS, or a renamed export.

About Elite Digital Forensics

Elite Digital Forensics is an independent digital forensics practice serving attorneys, paralegals, in house counsel, insurers, lenders, businesses, and individuals nationwide. Our team includes former law enforcement forensic examiners and court qualified expert witnesses in computer, cell phone, cloud, document, and multimedia forensics. Every engagement begins with a scoped plan, hash verified evidence handling, and a clear explanation of what the examination can answer.

Related Digital Forensics Resources

Questions about Excel headers and disguised exports

Does 50 4B 01 02 at the start identify a normal XLSX?

It identifies a ZIP central directory header, not the ordinary local header expected at a typical package start. Validate offsets and the full archive before classifying the workbook.

Must 50 4B 05 06 be the final bytes of an XLSX?

No. The end of central directory record includes fields and can be followed by a ZIP comment. Interpret the complete record and applicable archive structures.

Can the compound header identify an encrypted workbook's original Office type?

Not by itself. EncryptionInfo and EncryptedPackage identify a common encryption wrapper; authorized decryption and inspection of the resulting package establish its content type.

Does xl/vbaProject.bin prove that an XLSM macro executed?

No. It establishes stored VBA project content. Execution requires separate evidence such as application artifacts, logs, or a documented behavioral test.

Is an XLSB workbook a compound XLS file?

No. Modern XLSB uses ZIP packaging with binary workbook records. Typical BIFF8 XLS uses a compound container, so the required parsing approach differs.

Can an HTML file named XLS legitimately come from a reporting system?

Yes. Some systems use that naming convention for table exports. Document the actual HTML format and compare the system's normal output before interpreting the mismatch.

Establish the spreadsheet format before interpreting its evidence

Send the original attachment rather than a renamed or converted copy. We can identify the actual container, explain extension mismatches, and determine which workbook records are available for further examination. Our court qualified experts in spreadsheet forensics can testify to what the file signature proves.

Request Confidential Consultation Call (833) 292 3733

Primary sources and references

  1. PKWARE, APPNOTE.TXT, .ZIP File Format Specification. pkware.cachefly.net
  2. Microsoft Open Specifications, [MS CFB] Compound File Binary File Format. learn.microsoft.com
  3. Gary Kessler, File Signatures Table. www.garykessler.net
  4. Ecma International, ECMA 376, Office Open XML File Formats (also published as ISO/IEC 29500). Ecma International, ECMA 376
  5. Library of Congress, Sustainability of Digital Formats, XLSX Transitional (Office Open XML). www.loc.gov
  6. Library of Congress, Sustainability of Digital Formats, CSV, Comma Separated Values (RFC 4180). www.loc.gov
  7. IETF RFC 4180, Common Format and MIME Type for Comma Separated Values (CSV) Files. RFC Editor, RFC 4180

This content is for educational and informational purposes only and does not constitute legal advice. Elite Digital Forensics provides independent digital forensic services and expert witness testimony; we do not provide legal representation. Every case is fact specific; outcomes depend on the evidence, jurisdiction, and counsel. Retain qualified legal counsel for advice about your matter.

#DigitalForensics #ComputerForensics #CellPhoneForensics #ExpertWitness #DigitalForensicExperts #EliteDigitalForensics #ForensicInvestigation #CriminalDefenseForensics #XLSXMagicBytes #XLSSignature #ZIPHeaders #CompoundFiles #EncryptedOffice #XLSB #SpreadsheetFormats

Assistant Icon Elite Digital Forensics Assistant
πŸ‘‹ Live Chat Now!
Free Virtual Consultation 24/7
Chat Now!

By submitting this form, you consent to be contacted by email, text, or phone. Your information is kept secure and confidential. Reply Stop to opt out at anytime.Β 

IMPORTANT: Please remember to check your spam or junk folder