Rural farmland is not a capital asset, but urban and NA land is
The reason farmland can be tax-free is that rural agricultural land is expressly left out of the definition of a capital asset (Section 2(14)). If land is not a capital asset, its sale cannot produce a capital gain, so there is nothing to tax. That is the rule people remember.
What they forget is the boundary. Land is rural, and so outside the tax net, only if it satisfies both limbs of the test: it is not within the jurisdiction of a municipality or cantonment board with a population of 10,000 or more, and it is beyond the notified distance from such a municipality, measured in a straight line, more than 2 kilometres for a town of up to 1 lakh, 6 kilometres up to 10 lakh, and 8 kilometres above that. Land that fails either limb is urban agricultural land, which is a capital asset, and its sale is taxed.
Conversion removes the shelter, by the land's character at sale
The key point for converted land is that the exemption depends on what the land is when you sell it, not what it once was. Once agricultural land has been converted to non-agricultural use, held or sold as a plot for building rather than for cultivation, it is no longer agricultural land, so it is a capital asset and its sale is taxed, even if it sits in an otherwise rural location. The rural-agricultural shelter is lost the moment the land's character changes.
So the question on your sale is simple and factual: at the time of sale, is this rural agricultural land, in which case nothing is taxable, or is it urban agricultural land or converted non-agricultural land, in which case it is a normal immovable-property sale with capital gains. A practising CA establishes the land's character with the revenue records and the conversion order, because that determination decides whether there is any tax at all.
The tax and the TDS on a taxable sale
Where the land is taxable, converted or urban, it is an ordinary immovable-property capital gain. The cost is the actual cost, or the 1 April 2001 value for land acquired before then (Section 55), the holding period runs from the original acquisition, not from the conversion, and if held more than twenty-four months the gain is long-term, taxed for an NRI at the flat 12.5% with no indexation for sales on or after 23 July 2024 (Section 112). The resident-only option of 20% with indexation does not apply to you.
On TDS, the two cases differ. A taxable non-agricultural or urban sale is subject to deduction under Section 195 on the gain, and a Form 13 certificate brings that down from the gross. A genuinely rural agricultural sale has nothing chargeable, so no TDS is due; buyers and banks sometimes deduct anyway out of caution, which is then reclaimed on the return. Establishing the correct character up front is what avoids both an unnecessary deduction and an unexpected demand.