Surface encoding of colloidal nanoparticles with DNA is fundamental for fields where recognition interaction is required, particularly controllable material self-assembly. However, regioselective surface encoding of nanoparticles is still challenging because of the difficulty associated with breaking the identical chemical environment on nanoparticle surfaces. Here we demonstrate the selective blocking of nanoparticle surfaces with a diblock copolymer (polystyrene-b-polyacrylic acid). By tuning the interfacial free energies of a ternary system involving the nanoparticles, solvent and copolymer, controllable accessibilities to the nanoparticles’ surfaces are obtained. Through the modification of the polymer-free surface region with single-stranded DNA, regioselective and programmable surface encoding is realized. The resultant interparticle binding potential is selective and directional, allowing for an increased degree of complexity of potential self-assemblies. The versatility of this regioselective surface encoding strategy is demonstrated on various nanoparticles of isotropic or anisotropic shape and a total of 24 distinct complex nanoassemblies are fabricated.