Abstract: Molecularly imprinted polymers (MIPs) are crosslinked materials with recognition abilities for a template molecule. The binding sites in MIPs are heterogeneous, encompasing a wide range binding affinities. Presented is the chemical modification of MIPs, using a guest molecule as a selective in situ protecting group. The guest preferentially bound to the high affinity sites, and the exposed low affinity sites were esterified, leading to improvements in homogeneity and average binding affinities. Essential to the strategy was the measurement of the affinity distribution (number of binding sites versus association constant) for each polymer. The affinity distributions enabled verification as well as optimization of the selective chemical modification process, by quantification of the numbers of high and low affinity sites