Which energy transformation takes place when a firecracker explodes

Gravitational potential to mechanical and electromagnetic

Nuclear to magnetic and chemical

Mechanical to electromagnetic and electrical

Chemical to thermal and electromagnetic

2 answers

The chemical reaction is primarily oxidation, fast burning. However electromagnetic ? Only if it sets your phone off.
Since the last choice is the only one to include "thermal", that would be my choice.