Itraconazole capsule is used to treat fungal infections, such as aspergillosis (fungal infection in the lungs), blastomycosis (Gilchrist's disease), or histoplasmosis (Darling's disease). capsule is also used to treat onychomycosis (fungal infection in the fingernails or toenails).