We analyze the radial distribution of H_2_CO and C^18^O in the protoplanetary disk around HD 163296, a Herbig Ae type protostar, with the aim of determining possible formation scenarios of H_2_CO. By comparing the two molecules and the millimeter continuum, we investigate the relationship between the presence of H_2_CO and CO depletion in the disk.