In set theory, a universal set is a set which contains all objects, including itself. In set theory as usually formulated, the conception of a universal set leads to Russell's paradox and is consequently not allowed. However, some non-standard variants of set theory include a universal set.
Many set theories do not allow for the existence of a universal set. For example, it is directly contradicted by the axioms such as the axiom of regularity and its existence would imply inconsistencies. The standard Zermelo-Fraenkel set theory is instead based on the cumulative hierarchy.
Russell's paradox prevents the existence of a universal set in Zermelo-Fraenkel set theory and other set theories that include Zermelo's axiom of comprehension. This axiom states that, for any formula and any set A, there exists a set
that contains exactly those elements x of A that satisfy .
With chosen as , it follows that the subset is never a member of , since, as Bertrand Russell observed, the alternative is paradoxical: If contains itself, then it should not contain itself, and vice versa.
A second difficulty with the idea of a universal set concerns the power set of the set of all sets. Because this power set is a set of sets, it would necessarily be a subset of the set of all sets, provided that both exist. However, this conflicts with Cantor's theorem that the power set of any set (whether infinite or not) always has strictly higher cardinality than the set itself.
The difficulties associated with a universal set can be avoided either by using a variant of set theory in which the axiom of comprehension is restricted in some way, or by using a universal object that is not considered to be a set.
There are set theories known to be consistent (if the usual set theory is consistent) in which the universal set V does exist (and is true). In these theories, Zermelo's axiom of comprehension does not hold in general, and the axiom of comprehension of naive set theory is restricted in a different way. A set theory containing a universal set is necessarily a non-well-founded set theory. The most widely studied set theory with a universal set is Willard Van Orman Quine's New Foundations. Alonzo Church and Arnold Oberschelp also published work on such set theories. Church speculated that his theory might be extended in a manner consistent with Quine's,  but this is not possible for Oberschelp's, since in it the singleton function is provably a set, which leads immediately to paradox in New Foundations.
Another example is positive set theory, where the axiom of comprehension is restricted to hold only for the positive formulas (formulas that do not contain negations). Such set theories are motivated by notions of closure in topology.
The idea of a universal set seems intuitively desirable in the Zermelo-Fraenkel set theory, particularly because most versions of this theory do allow the use of quantifiers over all sets (see universal quantifier). One way of allowing an object that behaves similarly to a universal set, without creating paradoxes, is to describe V and similar large collections as proper classes rather than as sets. One difference between a universal set and a universal class is that the universal class does not contain itself, because proper classes cannot be elements of other classes. Russell's paradox does not apply in these theories because the axiom of comprehension operates on sets, not on classes.
The category of sets can also be considered to be a universal object that is, again, not itself a set. It has all sets as elements, and also includes arrows for all functions from one set to another. Again, it does not contain itself, because it is not itself a set.