This study compared the volatiles distribution in analytical scale pyrolysis (py-GC-MS) of Nannochloropsis gaditana (marine microalgae) and Scenedesmus almeriensis (freshwater microalgae) and their demineralized counterparts. The role of inorganic elements and their removal via ultrasonic treatment, water washing and (in) organic acid leaching were elucidated. Principal component analysis (PCA) and grey relational analysis were applied to analyze the pyrolysis volatiles distribution and demonstrate the influence of inorganic elements in pyrolysis, respectively. Demineralization affects (breaks down) the chemical structure of carbohydrates, followed by (to a lesser extent) proteins and lipids. Acid leaching promoted hydrolysis and suppressed...