Insert the probe of the soil pH tester into the ground about 6 inches from your hydrangea plant. Follow the instructions to get an accurate reading of the pH levels in the soil. Hydrangea flowers turn blue in soil that measures between 5.2 and 5.5 on the scale. Soil that is between 5.6 and 6.0 will only require two to three nails to reach the desired level, while a measurement of more than 6.0 requires five to six nails.
Put on your gardening gloves to protect your hands. Dig a 6-inch deep hole 4 to 5 inches from the base of the hydrangea on one side, being careful not to slice any of the root system in two. Deposit half of the nails in the bottom of the hole and cover with soil. Repeat on the other side of the plant with the rest of the nails.
Test the soil again two weeks later to ensure that the soil is at the desired level of acidity. If the soil is too acidic and measures below 5.2, the plant may be damaged. Remove half of the nails from each side of the plant. Add more nails to soil that is still too alkaline to change the flower color.