An instructor and two children pour three cups of powder into a bin of red liquid. Suddenly — poof — a cloud of what looks like cotton candy explodes toward the ceiling.

This popular video on Twitter comes courtesy of the Malay-language account w, which shares science content. But what is going on in the video?

It's a rather dangerous version of a classic chemistry demonstration, according to Brian Hostetler, an educator at the Denver Museum of Nature & Science. The reaction is typically known as "elephant's toothpaste," due to its foamy appearance, and it's commonly used in chemistry classrooms to explain catalysts, Hostetler told Live Science. [Elementary, My Dear: 8 Little-Known Elements]

More From LiveScience

Easy but explosive

The reaction uses cheap, easy-to-access ingredients: hydrogen peroxide, dish soap, potassium iodide and food coloring. Hydrogen peroxide is key. It's made up of two hydrogen and two oxygen molecules. The bonds between these molecules naturally break, so over time, hydrogen peroxide slowly becomes water and oxygen gas. That reaction happens faster when exposed to light, Hostetler said, which is why hydrogen peroxide is sold in brown bottles.

Normally, the slow breakup (or decomposition, in chemistry terms) of hydrogen peroxide into water and oxygen is unnoticeable. But the elephant's toothpaste experiment speeds the process with a catalyst, a chemical compound that increases the rate of a given reaction. Potassium iodide — a salt of iodine, and the dietary supplement that's used to add iodine to table salt — provides that catalyst.

"In the presence of potassium iodide, hydrogen peroxide decomposes almost immediately," Hostetler said.

The setup is simple. Hydrogen peroxide is mixed with dish soap, and food coloring is often added for a dramatic effect (which explains the cotton-candy pink in the Twitter video). The potassium iodide is added, and the iodide ion that's part of that compound attracts the oxygen in the hydrogen peroxide, breaking the bonds and rapidly transforming the hydrogen peroxide into water and oxygen gas. The oxygen molecules then get trapped by the soap, forming bubbles, Hostetler said. In a step sometimes added to the elephant's toothpaste demonstration, a glowing splint — a strip of wood that is hot but not burning — that is inserted into the bubbles will catch alight, sparked by the pure oxygen.

Toning it down

Usually, Hostetler said, the elephant's toothpaste experiment creates an oozy concoction. So why did the Twitter version send bubbles flying toward the ceiling?

That particular reaction was due to the strength of the ingredients and the shape of the containers, Hostetler said. A fairly safe version of the elephant's toothpaste demonstration can be done at home with 3% hydrogen peroxide bought from the drugstore, with yeast as the catalyst (yeast contains the enzyme catalase, which also breaks down bonds in hydrogen peroxide). The combination will ooze and get a little warm as the reaction releases heat, but other than the need to take care not to touch the "toothpaste," as hydrogen peroxide can be irritating to skin and eyes, this DIY version is pretty safe.

The Twitter video probably shows the reaction with 30% hydrogen peroxide, or even stronger, Hostetler said. The demonstrator also uses potassium iodide that's in powder form instead of mixed into water. And he has it poured in three batches at once into a large container with a lot of surface area, so the reaction happens across a large amount of hydrogen peroxide all at one time.

That makes the scene in the video "super-duper dangerous," Hostetler said. Thirty percent or higher hydrogen peroxide can cause chemical burns on the skin, he said, and the reaction could heat the solution by hundreds of degrees. It's that heat and steam from the reaction that floats some of the foam skyward in the Twitter video.

The bottom line, Hostetler said, is not to try the jumbo version of the demonstration at home – but feel free to press "play" again on Twitter.

"It's a cool video," he said.

Originally published on Live Science.