This Letter reports on the remarkable selectivity of capsid proteins for packaging synthetic polyelectrolytes in viruslike particles. By applying the contrast variation method in small-angle neutron scattering, we accurately estimated the mean mass of packaged polyelectrolytes ⟨Mp⟩ and that of the surrounding capsid ⟨Mcap⟩. Remarkably, the mass ratio ⟨Mp⟩/⟨Mcap⟩ was invariant for polyelectrolyte molecular weights spanning more than 2 orders of magnitude. To do so, capsids either packaged several chains simultaneously or selectively retained the shortest chains that could fit the capsid interior. Our data are in qualitative agreement with theoretical predictions based on free energy minimization and emphasize the importance of protein self-energy. These findings may give new insights into the nonspecific origin of genome selectivity for a number of viral systems.