The authors developed a compact vacuum- and hydrogen-annealing machine to transform and smooth silicon surfaces for silicon microoptical devices. Two kinds of configurations, named sealing type and flowing type, were evaluated. The sealing type configuration was designed to anneal a sample inside a H2 gas environment contained within a quartz tube. On the other hand, the flowing type configuration was designed to anneal the sample using a flowing H2 gas environment. The machine sizes were 1.6 m in width, 0.55 m in depth, and 1.3 m in height. Control ranges of temperature and pressure were between 20 °C and 1300 °C and between 4.1×10-7 and 760 Torr, respectively. Using the flowing type configuration, the samples were successfully smoothed at conditions of H2 partial pressure of 50 Torr, temperature of 1230 °C, H2 gas flow rate of 1 slm, and annealing time of 11 min. By transforming the surface, microlenslike structures with the size of the order of several micrometers and a sinusoidal grating were also fabricated from cylindrical pillars and a lamellar grating, respectively. The authors measured the surface roughness on the samples before and after annealing, and it was obviously decreased after annealing for all of the measured samples.