What the largest predator that ever lived is depends on what a person considers to be a predator. There are various definitions of predation, but it's safe to say that anything that consumes other animals for food is a predator. Under this broad definition, the largest that ever lived is the blue whale, which consumes several tons of plankton every day. Plankton includes both algae and organisms such as krill.
The blue whale weighs up to 200 short tons (180 metric tons) and individuals up to 98 ft (29.9 m) in length have been found. It is thought to be not just the largest predator that ever lived, but the largest animal in general. A whale that filters krill with its baleen is not generally what people think of when they hear the word "predator," however. The sperm whale may come closer, being the largest toothed animal. With a size up to 67 ft (20.5 m) long, the sperm whale eats fish and several types of squid.
There are also at least three other very large predators that have a chance of vying for the title if whales are excluded: an unidentified pliosaur called the Monster of Aramberri, which was about 49 ft (15 m) in length (contrary to earlier exaggerated estimates); Spinosaurus, the largest known predatory dinosaur, at 59 ft (18 m) long; and the titanic shark Megalodon, at 60 ft (18.2 m). The most terrifying are the last two, which had tremendous bulk and would have needed to eat many other animals to sustain themselves.
Spinosaurus was a huge theropod dinosaur with a large tail sail and an elongated, crocodilian skull. It was the largest predator of the Mesozoic, weighing in at 7.7 to 9.9 short tons (7 to 9 metric tons), and lived during the Cretaceous period, 100 to 93 million years ago. A few skeletal fragments have been found in Egypt and Morocco. It primarily ate fish, though it would have consumed small herbivores and scavenged for carrion.
Many people consider Megalodon to be the most ferocious predator of all time. This was a shark so huge that the height of its tail fin approximately equals the length of a Great White Shark. Its teeth, which still wash up on shores occasionally, are larger than a man's fist. Megalodon lived between 18 and 1.5 million years ago, quite recent in evolutionary terms, which has prompted some crytozoologists to hypothesize it might still be alive, though no evidence has been found to this effect.