A combination of wide-angle X-ray scattering (WAXS) and pair distribution function analysis was used to investigate the structural changes occurring in beech wood and apricot tree pruning samples during slow and fast pyrolysis up to 1400 C (1673 K). WAXS curve modeling with the program CarbX provides unique information about the arrangement of graphene layers described by intralayer, interlayer, disorder and dispersion structural parameters. Pair distribution function modeling in PDFgui revealed imperfections in single graphene sheets, such as bond shortening and curvature, when refinement is performed in different r ranges. The concentration of inorganic species, along with heating rate, influences the final structure of pyrolysis products. The heating rate was more important than sample composition for an increase in extent of the single graphene layer and average chord length, while the average graphene coherent stack height depended on both composition and heating rate. Higher fractions of inorganic material increased the average interlayer spacing and the number of graphene layers per stack. research papers J. Appl. Cryst. (2019). 52, 60-71 Agnieszka Poulain et al. WAXS and PDF analysis of pyrolyzed wood 61 research papers J. Appl. Cryst. (2019). 52, 60-71 Agnieszka Poulain et al. WAXS and PDF analysis of pyrolyzed wood 63 Figure 1Background-corrected 2D WAXS images of the RB (left), BFH450 (middle) and RA (right) samples, with the three most intense peaks, 200, 110 and 110, indicated. The empty regions in the raw apricot image come from the gaps between the reading chips in the PILATUS detector.