The US Navy has released footage of a "full ship shock trial" taking place next to one of the newest and largest aircraft carriers in the world.

The video shows a huge explosion next to the 100,000-tonne USS Gerald R Ford aircraft carrier, off the east coast of the US on Friday.

The United States Geological Survey recorded the explosion as a 3.9 magnitude earthquake about 161km off the coast of Florida.

The US Navy conducts trials using live explosives to test that its warships "can continue to meet demanding mission requirements under harsh conditions they might encounter in battle," the navy said in a statement.