Aim of the study is to develop a simulation software which allows to predict the diffusion-controlled transformation processes during oxidation and nitridation of metals and alloys. Internal oxidation and nitridation often results in a deep penetration of coarse and sometimes needle-shaped precipitates that act as crack initiation sites, i.e., giving rise to an embrittlement of the surface layer. The method of cellular automata according to Chopard and Droz has been applied to simulate internal nitridation processes. The approach allows implementing, e.g., the diffusion-blocking effect of the internal precipitates, and the mechanisms of nucleation and growth. As an example, TiN formation in Ni-base alloys was simulated by treating nitrogen diffusion and precipitation separately and simultaneously. The progress of internal nitridation follows a parabolic rate law in agreement with Wagner's theory of internal oxidation and experimental results. Furthermore, the cellular automata approach is capable to predict the transition from internal precipitation to external scale formation and to implement the process of nucleation and growth of nitride and oxide precipitates.