There are two aspects to using chemicals to kill algae.
First, any chemical added to the tank will end up inside the fish. It is better to avoid adding chemicals whenever possible.
Secondly, you need to work out why you have algae and rectify that. Killing it with a chemical is not a long term solution because unless the conditions that caused the algae are changed, it will come back.
The usual cause of algae is an imbalance between light duration, fertiliser and CO2.
Do you have any live plants in the tank?
If you do have plants, do you add plant fertiliser and/or CO2, either gas or 'liquid CO2' products?
How long are the tank lights on for?
Does sunlight shine on the tank at any time during the day?