In topology and related branches of mathematics, a **totally disconnected space** is a topological space that is maximally disconnected, in the sense that it has no non-trivial connected subsets. In every topological space, the singletons (and, when it is considered connected, the empty set) are connected; in a totally disconnected space, these are the *only* connected subsets.

An important example of a totally disconnected space is the Cantor set. Another example, playing a key role in algebraic number theory, is the field **Q**_{p} of *p*-adic numbers.

A topological space *X* is **totally disconnected** if the connected components in *X* are the one-point sets. Analogously, a topological space *X* is **totally path-disconnected** if all path-components in *X* are the one-point sets.

The following are examples of totally disconnected spaces:

- Discrete spaces
- The rational numbers
- The irrational numbers
- The p-adic numbers; more generally, all profinite groups are totally disconnected.
- The Cantor set and the Cantor space
- The Baire space
- The Sorgenfrey line
- Every Hausdorff space of small inductive dimension 0 is totally disconnected
- The Erdős space ℓ
^{2}is a totally disconnected Hausdorff space that does not have small inductive dimension 0. - Extremally disconnected Hausdorff spaces
- Stone spaces
- The Knaster–Kuratowski fan provides an example of a connected space, such that the removal of a single point produces a totally disconnected space.

- Subspaces, products, and coproducts of totally disconnected spaces are totally disconnected.
- Totally disconnected spaces are T
_{1}spaces, since singletons are closed. - Continuous images of totally disconnected spaces are not necessarily totally disconnected, in fact, every compact metric space is a continuous image of the Cantor set.
- A locally compact Hausdorff space has small inductive dimension 0 if and only if it is totally disconnected.
- Every totally disconnected compact metric space is homeomorphic to a subset of a countable product of discrete spaces.
- It is in general not true that every open set in a totally disconnected space is also closed.
- It is in general not true that the closure of every open set in a totally disconnected space is open, i.e. not every totally disconnected Hausdorff space is extremally disconnected.

Let be an arbitrary topological space. Let if and only if (where denotes the largest connected subset containing ). This is obviously an equivalence relation whose equivalence classes are the connected components of . Endow with the quotient topology, i.e. the finest topology making the map continuous. With a little bit of effort we can see that is totally disconnected. We also have the following universal property: if a continuous map to a totally disconnected space , then there exists a *unique* continuous map with .

- Willard, Stephen (2004),
*General topology*, Dover Publications, ISBN 978-0-486-43479-7, MR 2048350 (reprint of the 1970 original, MR0264581)