Cyanobacteria also known as (blue-green algae, blue-green bacteria, and Cyanophyta) is a phylum of bacteria that obtain their energy through photosynthesis. The name "cyanobacteria" comes from the color of the bacteria.

The ability of cyanobacteria to perform oxygenic photosynthesis is thought to have converted the early reducing atmosphere into an oxidizing one, which dramatically changed the composition of life forms on Earth by stimulating biodiversity and leading to the near-extinction of oxygen-intolerant organisms. According to endosymbiotic theory, chloroplasts in plants and eukaryotic algae have evolved from cyanobacterial ancestors via endosymbiosis.

Cyanobacteria can be found in almost every conceivable environment, from oceans to fresh water to bare rock to soil. They can occur as planktonic cells or form phototrophic biofilms in fresh water and marine environments, they occur in damp soil, or even on temporarily moistened rocks in deserts. A few are endosymbionts in lichens, plants, various protists, or sponges and provide energy for the host. Some live in the fur of sloths, providing a form of camouflage.

Aquatic cyanobacteria are probably best known for the extensive and highly visible blooms that can form in both freshwater and the marine environment and can have the appearance of blue-green paint or scum. The association of toxicity with such blooms has frequently led to the closure of recreational waters when blooms are observed. Marine bacteriophages are a significant parasite of unicellular marine cyanobacteria. When they infect cells, they lyse them, releasing more phages into the water.

Many cyanobacteria also form motile filaments, called hormogonia, that travel away from the main biomass to bud and form new colonies elsewhere. The cells in a hormogonium are often thinner than in the vegetative state, and the cells on either end of the motile chain may be tapered. In order to break away from the parent colony, a hormogonium often must tear apart a weaker cell in a filament, called a necridium.

Each individual cell of a cyanobacterium typically has a thick, gelatinous cell wall. They lack flagella, but hormogonia and some species may move about by gliding along surfaces. Many of the multi-cellular filamentous forms of Oscillatoria are capable of a waving motion; the filament oscillates back and forth. In water columns some cyanobacteria float by forming gas vesicles, like in archaea. These vesicles are not organelles as such. They are not bounded by lipid membranes but by a protein sheath.

Some of these organisms contribute significantly to global ecology and the oxygen cycle. The tiny marine cyanobacterium Prochlorococcus was discovered in 1986 and accounts for more than half of the photosynthesis of the open ocean. Many cyanobacteria even display the circadian rhythms that were once thought to exist only in eukaryotic cells.