Can explosions work in space?

Conservation of energy.

Suppose you are 20m from a ton of TNT when it goes off. On earth a certain amount of energy will reach you. In space where is that energy going to go? 20m away in a vacuum just as much energy would hit you, probably more as there is no loss to gas in between.

OK so no shock wave, but you would still be hit by a blast of gas molecules travelling very fast, which would dump heat into your skin in a very short time period,  causing your skin to ablate creating a  blast wave in your skin.

Your limbs would be torn off by the reaction from the gas ablating from your skin, just as they would torn off by a shock wave on earth.

The energy of the explosion has to go somewhere and if you are in the way of it, something violent is going to happen.