The energy-efficient separation of chemical feedstocks is a major sustainability challenge. Porous extended frameworks such as zeolites or metal-organic frameworks are one potential solution to this problem. Here, we show that organic molecules, rather than frameworks, can separate other organic molecules by size and shape. A molecular organic cage is shown to separate a common aromatic feedstock (mesitylene) from its structural isomer (4-ethyltoluene) with an unprecedented perfect specificity for the latter. This specificity stems from the structure of the intrinsically porous cage molecule, which is itself synthesized from a derivative of mesitylene. In other words, crystalline organic molecules are used to separate other organic molecules. The specificity is defined by the cage structure alone, so this solid-state 'shape sorting' is, uniquely, mirrored for cage molecules in solution. The behaviour can be understood from a combination of atomistic simulations for individual cage molecules and solid-state molecular dynamics simulations.