A colorimetric pH sensor has been developed based on GNP aggregation mediated by A-motif formation under acidic conditions. The pH response of the sensor can be tuned in the range of pH 2-5.5 by changing the length and the sequence of the A-motif forming poly dA tracts.