In mathematics, a metric space (or topological space) X is separable if it has a countable subset Y such that members of Y approximate any x in X as closely as we like. Formally, a topological space is separable if and only if it has a subset that is both countable and dense. Separable spaces are therefore topological spaces with a certain limit on their size: an uncountable discrete space isn't separable.

Most of the spaces initially encountered are indeed separable: for example the real numbers with their standard metric have the rational numbers as a countable dense subset. Since the space of continuous functions on the interval [0,1] with the metric of uniform convergence has a dense subset of polynomials (see Weierstrass approximation theorem), and their coefficients can be approximated by rationals, that space is also separable. A Hilbert space is separable if and only if it has a countable orthonormal basis.

For technical reasons the foundations of general topology are written without the requirement of separability, or other 'axioms of countability'.

Separability is especially important in numerical analysis and constructive mathematics, since many theorems that can be proved for nonseparable spaces have constructive proofs only for separable spaces. Such constructive proofs can be turned into algorithms for use in numerical analysis, and they are the only sorts of proofs acceptable in constructive analysis. A famous example of a theorem of this sort is the Hahn-Banach theorem.

Every second countable space is separable. As a partial converse, every separable metric space must be second countable. More generally, every separable uniform space whose uniformity has a countable basis must be second countable.

An example of a separable space that is not second countable is Rllt, the set of real numbers equipped with the lower limit topology. To avoid violating the previous paragraph, it follows that Rllt must not be metrisable -- it can't be made into a metric space. On the other hand, because Rllt is completely regular, it is uniformisable -- it can be made into a uniform space. But again, to avoid violating the previous paragraph, none of its uniformities could possibly have a countable basis.