The most common cause of black spots on goldfish are trauma and irritation due to high ammonia levels in the water. High ammonia actually burns the scales, resulting in white patches. The black spots appear as the scales begin to heal.
Ammonia burns can be easily treated by removing excess ammonia from the aquarium. Once the ammonia levels are in balance, the white patches begin to heal, resulting in black spots. Excess ammonia occurs when undigested food begins to decompose in the fish tank. High ammonia levels are also common in overpopulated fish tanks, due to excessive fish waste. Proper water changes and tank cleaning can help to balance out the ammonia levels.
Black spot disease is a rare illness carried by snails that have been exposed to bird droppings. If infected snails are unknowingly placed in the tank, they can pass the disease onto the goldfish. Parasites burrow into the scales and form a hard black cyst. Black spot disease is relatively harmless in goldfish, and in many cases, the cysts disappear on their own. Since there is no surefire way of knowing whether or not snails are carrying the disease, the best way to prevent black spot disease is to keep all snails out of the aquarium.