We introduce the problem of unsupervised classification of quantum data, namely, of systems whose quantum states are unknown. We derive the optimal single-shot protocol for the binary case, where the states in a disordered input array are of two types. Our protocol is universal and able to automatically sort the input under minimal assumptions, yet partially preserving information contained in the states. We quantify analytically its performance for arbitrary size and dimension of the data. We contrast it with the performance of its classical counterpart, which clusters data that has been sampled from two unknown probability distributions. We find that the quantum protocol fully exploits the dimensionality of the quantum data to achieve a much higher performance, provided data is at least three-dimensional. For the sake of comparison, we discuss the optimal protocol when the classical and quantum states are known.