The United States Geological Survey said the quake occurred near the city of Sandoval at 12:29 GMT. It was not immediately known if there were casualties or damage.
Quake-prone Costa Rica was rattled in September of last year by a powerful 7.6-magnitude earthquake which briefly knocked out power and caused widespread panic, but no known deaths or injuries.
The Pacific Tsunami Warning Center in Hawaii today did not immediately issue a warning over the threat of a tidal wave from today's quake.
