Paracanthurus hepatus is distributed across tropical and subtropical waters of the Indian and western-to-central Pacific Oceans, from the East African coast, Madagascar, and the Maldives eastward through Indonesia, the Philippines, southern Japan, Australia's Great Barrier Reef, New Caledonia, and Samoa (it is absent from the Red Sea and replaced by other acanthurids in Hawaii, apart from occasional stray sightings). Within that range, it occupies clear, current-swept outer reef slopes, channels, and outer reef flats between 2 and 40 meters (6.5 to 131 feet) deep.
Water movement and branching coral architecture dictate where groups congregate. Rather than wandering over open sand flats, blue tangs stay within a few meters of cauliflower coral (Pocillopora eydouxi), staghorn Acropora, or deeply fissured reef rock. Strong tidal currents bring suspended plankton past the reef crest while keeping sediment off the algal turf the adults crop.
At dusk, foraging stops and each fish wedges itself into a specific coral head or rock crevice for the night, locking its dorsal, pelvic, and caudal spines against the limestone so nocturnal predators cannot pull it free. During sleep, its brilliant royal blue fades to a duller violet-white along the flanks, a reversible pigment shift in the skin chromatophores that reduces visibility in dim moonlight.