Local police put the number at over half a million, while an AFP photographer said at least 50,000 farmers and supporters took part.
The farmers want state authorities to repeal controversial farm legislation.
Organisers described the rally as the biggest protest since their movement began last November.
For days, buses and tractors have been ferrying farmers into the city of Muzaffarnagar, sparking a major security operation.
The Indian government says the laws, which loosen rules around how farmers can sell their produce, will give farmers more freedom.
But opponents say the reforms leave small farmers vulnerable to big corporations.