A magnitude-6.2 earthquake hit off northern Japan on Wednesday at a depth of 480 kilometers, according to the Japan Meteorological Agency.