The selective deposition of In2O3 was studied on GaAs substrates having a carbon pattern prepared by electron beam (EB) irradiation, in order to fabricate an In2O3 mask for in situ processing. The carbon pattern less than 5 nm thick was formed on GaAs by the scanning irradiation of EB in trimethylindium (TMIn) ambient, and the subsequent deposition of In2O3 was carried out in situ with a simultaneous supply of TMIn and H2O2. By this two-step processing, the carbon pattern is transferred to an In2O3 film below 550°C, which can be used as a mask for in situ selective epitaxy of semiconductors. We also found for the first time that the selective etching of GaAs takes place under H2O2 at temperatures above 600°C. The mechanism of the etching process involves the oxidation of GaAs by H2O2 and the simultaneous desorption of GaAs oxide. The selectivity in the In2O3 deposition and the GaAs etching is derived from the suppression of TMIn decomposition or GaAs oxidation on the carbon pattern. Considering that the deep submicron carbon pattern can be formed by focused EB irradiation, the pattern transferring technique presented here is advantageous for in situ processing of nanostructures.