Starting from bulk carbides, the removal by hydrogen of free carbon, oxygen from passivation and from carbidic carbon was studied in temperature-programmed experiments. Treatment of WC1+xOy with flowing hydrogen shows that the production of methane is maximum at about 700 degrees C, above which it decreases. However, at the final pretreatment temperature, a residual partial pressure of methane is still observed, but this residual methane pressure decreases with temperature and disappears. After a few hours' treatment in hydrogen the final solid corresponds approximately to the stoichiometry WC without extra carbon. Such a treatment was monitored by X-ray diffraction in a diffractometer allowing temperature-programmed experiments from room temperature up to 900 degrees C. It was shown that no metallic tungsten appears below 700 degrees C. The amount of metal formed during treatment at 750 degrees C is very small, and above 750 degrees C it increases with temperature. However, even after a two hour treatment at 800 degrees C, followed by treatment at 900 degrees C, large proportions of carbide are maintained. No W2C formation is detected. W2C, after passivation, is very sensitive to hydrogen treatment, since a thermogravimetric experiment showed that, after a five hour treatment in hydrogen at 600 degrees C, W2C was completely decarburized into W. W2C seems relatively stable at 400 degrees C. A treatment of Mo2C containing large amounts of free carbon in hydrogen at 700 degrees C leads to MoC0.47, that is, to clean Mo2C. On the other hand, Cr3C2 behaves differently in hydrogen since some decarburization occurs before complete elimination of excess free carbon. By temperature-programmed X-ray diffraction in a O-2 (2%)-N-2 mixture from room temperature to 500 degrees C, it is shown that oxidation of WC to WO3 starts at 400 degrees C and is very fast at 500 degrees C. No oxycarbides or intermediary oxides such as WO2 were detected.