A small tsunami measuring about 10 inches in height did wash up on Port Vila, but there were no reports of damage from it.
One police spokesman told reporters that it was the strongest he had ever felt in his life.
A four-story office building that houses the New Zealand High Commission suffered some damage, according to Ben McKenzie, who is first secretary of the diplomatic post.
He told the Associated Press that office shelves and ceiling tiles fell down and computers were "thrown across the office" by the jolt.
The epicenter of the quake was only about 20 miles offshore from Port Vila at a depth of 21 miles, according to the U.S. Geological Survey.
Vanuatu, which is located between northeastern Australia and Fiji, is a geologically active region with frequent earthquakes and occasional volcanic eruptions.