After reading the first Foundation book in the series, I asked myself if Trantor was Earth at one point. I don't think Asimov ever mentions Earth in the Foundation series.
Definitely not, given Trantor's physical location in the galaxy and its planetary properties. Trantor is located as close to the galactic core as possible for humans to still be able to inhabit it. It is also slightly larger than Earth.
Trantor was first mentioned in a short story by Asimov, 'Black Friar of the Flame', later collected as The Early Asimov, Volume 1. It was described as a human-settled planet in the part of the galaxy not ruled by an intelligent reptilian race (later defeated). Later, Trantor gained prominence when the 1940s Foundation series first appeared in print (in the form of short stories). Ref: Wikipedia -> Trantor
Asimov described Trantor as being in the centre of the galaxy. Earth is located on the Orion Arm out near the edge of the galaxy.
In later stories he acknowledged the growth in astronomical knowledge by retconning its position to be as close to the galactic centre as was compatible with human habitability. The first time it was acknowledged in novel form was in Pebble in the Sky.
Trantor is depicted as the capital of the first Galactic Empire. Its land surface of 194,000,000 km² (75,000,000 miles², 130% of Earth land area) was, with the exception of the Imperial Palace, entirely enclosed in artificial domes.
How many Foundation books have you read? By Foundation's Edge, it's clear that Earth isn't a known planet in the Foundation time-frame. The following book, Foundation and Earth is all about the search for Earth, and it is definitely not Trantor.
Trantor was never intended to be Earth. Thaddeus's answer gives some evidence from early canon.
Later Asimov linked the Foundation universe with the Robots universe, which situated Earth in the Foundation universe. Robots and Empire is the original book that connects the two; it explains what happened to the planet Earth and lays the groundwork for why the Empire, the Foundations and Gaia came to exist. The 1980s Foundations books expand on that connection.
In Robots and Empire, the Earth is rendered uninhabitable. The two humaniform robots Giskard and Daneel decide not to prevent this, so as to give humanity an impulse to spread out and thrive throughout the galaxy. Daneel starts imagining how he will guide mankind in secret.
Pebble in the Sky was published in 1950, between the original Foundation stories appearing in magazine form and in book form.
It identifies Earth as a small but particularly annoying part of the Trantorian Empire.
In Foundation, Lord Dorwin makes it clear that knowledge of the location of Earth is lost.