Hydrogen peroxide is safe for use for getting rid of the algae in your fish tank. It not only fights algal bloom efficiently but also adds more oxygen to the water, clear residual external infection, or fungi. It is often used by breeders to protect their fish fry or spawns from catching parasitic or fungal infections much more efficiently than methylene blue.
I used hydrogen peroxide to clear off the algae in my 40-gallon fish tank. Also, if you want to be more precise, using a milliliter calibrated syringe helps a lot (syringe without any needles). It is safe to use 2ml to 3ml of hydrogen peroxide for every, one gallon of water for fish tanks exclusive to fish only.
A word of caution is that if you have snail or shrimp in the tank, hydrogen peroxide can cause harm to them. Use the springe to pour the peroxide on algae heavy spots before rinsing off.