A resin composition for an optical waveguide is provided, which permits easy formation of a core pattern using an alkali developing liquid and suppresses degradation of the alkali developing liquid. An optical waveguide produced by using the resin composition is provided. The resin composition comprises: (A) an alkali soluble resin, as a major component, having a structural unit represented by formula (1):wherein R1, R2 and R3, which may be the same or different, are each a hydrogen atom or a methyl group; R5 and R6, which may be the same or different, are each a hydrogen atom or a methyl group; R4 isand m+n+p=1, m>0, n>0 and p>0; and (B) a photopolymerization initiator. The optical waveguide includes a substrate, a cladding layer provided thereon, and a core portion provided in the cladding layer for transmitting an optical signal.