The 2 devices are similar but slightly different in their effects:
Some flash hiders, like the classic A2 "half birdcage", also have the properties of a compensator (reduce the effect of muzzle "flip").
Want to learn more about muzzle devices? Check out our article: What is the Best Muzzle Device for my AR-15? Muzzle Brake vs. Flash Hider vs. Compensator