---
title: "Threading (JWZ) — Glossary — Mbox Viewer"
description: "How email clients group related messages into conversations, following the In-Reply-To and References headers with the JWZ algorithm."
url: https://mboxviewerpro.com/glossary/threading/
language: en
source: Mbox Viewer
---

[Mbox Viewer](https://mboxviewerpro.com/)  [Glossary](https://mboxviewerpro.com/glossary/)  Threading (JWZ)

# Threading (JWZ)

The process of grouping related email messages into conversations by following In-Reply-To and References header links, typically using the JWZ algorithm that supports up to four levels of nesting.

Email threading reconstructs the conversation structure of a mailbox from the message graph encoded in headers. The JWZ algorithm, published by Jamie Zawinski in 1997 and widely adopted in mail clients, works in two phases: first, it builds a tree of messages by following Message-ID, In-Reply-To, and References links; second, it prunes and sorts the tree to produce a clean, readable thread view.

When explicit header links are missing — common in older messages or after forwarding — threading algorithms fall back to subject matching: messages with the same subject (after stripping Re:, Fwd:, and similar prefixes) are grouped together. This heuristic produces reasonable results for most conversations but can occasionally merge unrelated messages that happen to share a subject.

Thread views dramatically improve navigation in large archives. Instead of scanning thousands of individual messages in date order, you can find a thread, collapse it, and move on. Mbox Viewer applies threading when displaying MBOX archives, grouping messages into conversations and indicating nesting depth up to four levels in the message list.

## Related terms

[

Message-ID

A globally unique identifier assigned to each email message, specified in the Message-ID header. It is used to track messages, build conversation threads, and detect duplicates when merging archives.

](https://mboxviewerpro.com/glossary/message-id/)[

In-Reply-To / References

Email headers (In-Reply-To and References) that link a reply to the message it responds to, enabling mail clients and archive tools to group related messages into conversation threads.

](https://mboxviewerpro.com/glossary/in-reply-to/)[

Gmail labels

Gmail's tagging system that assigns one or more labels to each message, serving the role that folders play in traditional email clients. A single message can carry multiple labels simultaneously.

](https://mboxviewerpro.com/glossary/gmail-labels/)

[Back to the full glossary](https://mboxviewerpro.com/glossary/)

## Read your MBOX files on Mac and Windows

[Download on the Mac App Store](https://apps.apple.com/app/mbox-viewer-pro/id6759237715) [Microsoft Store](https://apps.microsoft.com/store/detail/9NW3GVFG7DDB)
