Marine algae have unique defense strategies against microbial infection. However, their mechanisms of immunity remain to be elucidated and little is known about the similarity of the immune systems of marine algae and terrestrial higher plants. Here, we suggest a possible mechanism underlying algal immunity, which involves hexose oxidase (HOX)-dependent production of hydrogen peroxide (H2O2). We examined crude extracts from five different red algal species for their ability to prevent bacterial growth. The extract from one of these algae, Ptilophora subcostata, was particularly active and prevented the growth of gram-positive and -negative bacteria, which was completely inhibited by treatment with catalase. The extract did not affect the growth of either a yeast or a filamentous fungus. We partially purified from P. subcostata an enzyme involved in its antibacterial activity, which shared 50% homology with the HOX of red seaweed Chondrus crispus. In-gel carbohydrate oxidase assays revealed that P. subcostata extract had the ability to produce H2O2 in a hexose-dependent manner and this activity was highest in the presence of galactose. In addition, Bacillus subtilis growth was strongly suppressed near P. subcostata algal fronds on GYP agar plates. These results suggest that HOX plays a role in P. subcostata resistance to bacterial attack by mediating H2O2 production in the marine environment.