First things first: Swordfish and marlin are entirely different fish.
Swordfish belong to the Xiphiidae family, while both marlin and sailfish are part of the Istiophoridae family. That taxonomic split explains their major physical and behavioral differences.
The swordfish has a long, flat bill and a rounded body built for endurance in the deep water. It also sports a tall, crescent-shaped dorsal fin.
In contrast, marlins — including blue marlin, black marlin and striped marlin — tend to have more elongated bodies and a pointier, spear-like bill. Their dorsal fins are lower but extend further back.