Whether you need a visa depends on your nationality, not your itinerary

Mexico decides visa requirements by passport nationality, and the Instituto Nacional de Migración (INM) publishes two lists: countries and regions that do not require a visa to travel to Mexico and those that do require one under any condition of entry. The lists move. Several South American nationalities that were once visa-free now need a visa, and secondary sites reproduce old versions of the tables for years, so the only version worth trusting is the one on INM's own site on the day you book.

If your nationality is on the visa-required list, a Mexican consulate issues the visa, and the entry condition you are applying for is visitante sin permiso para realizar actividades remuneradas, the visitor condition without permission to carry out paid activities in Mexico.

Documents that work instead of a Mexican visa

INM accepts several documents in place of a Mexican visa for nationalities that would otherwise need one, and this is the single most useful thing for a traveller to know. On its own visa-required page, INM lists as alternatives: proof of permanent residence in Canada, the United States, Japan, the United Kingdom, any Schengen country, or a Pacific Alliance member (Chile, Colombia and Peru); a valid and current visa from Canada, the United States, Japan, the United Kingdom or any Schengen country; and an APEC Business Travel Card approved by Mexico, which counts only for air arrivals travelling on business.

The paper FMM has gone at airports

The Forma Migratoria Múltiple, the tourist card that generations of visitors filled in on the plane, is no longer used for air arrivals. INM's own page on the Forma Migratoria Múltiple Digital states that arriving by air means you do not complete the electronic FMM or the traditional paper one, that INM omits issuing the physical form, and that the federal migration agent stamps your passport and records the estimated departure date corresponding to the period granted. A digital record exists and can be downloaded once during the authorised period, but the passport stamp is the operative document.

Land borders are different. Both INM visa pages still list a properly completed FMM as a document to present at the immigration filter for land entries only, so if you are crossing from the United States, Guatemala or Belize, expect a form and expect to keep it.

The officer writes your days, and 180 is a ceiling

The number of days you are given is a decision, not an entitlement. Article 52 of the Ley de Migración authorises a visitor without permission to carry out paid activities to stay "for an uninterrupted period of no more than one hundred and eighty days, counted from the date of entry." No more than is the operative phrase. INM's visa-required page puts the same point bluntly: you cannot exceed 180 days unless you hold residence or have an immigration procedure under way.

In practice officers write anything from a handful of days to the full 180, often keyed to what you told them about your trip and what your return ticket shows. Read the stamp before you leave the filter. It carries the date by which you must leave, and that date, not your own assumption, is what an inspection or an airline will go by.

What the officer can ask you to show

INM publishes the list of things the migration authority will request in order to corroborate the purpose of your trip, and it is longer than most travellers expect. On both visa pages it names hotel reservations, return tickets and tour itineraries; your usual place of residence and where you are coming from; your address and length of stay in Mexico; the name and address of anyone employing or inviting you; what you do at home and what you will do in Mexico; your means of subsistence during the stay; and the transport by which you will leave the country.

You will not usually be asked for all of it. But the list explains why a vague answer at the counter can turn into a short grant of days: if you cannot show where you are staying or how you are leaving, the officer has nothing to write a longer period against. Have the first night's booking and the outbound flight on your phone, offline, before you join the queue.

If you stay longer than your stamp allows

Overstaying is treated as an irregular situation to be regularised, not ignored. Article 134 of the Ley de Migración lets a foreigner who entered legally and then exceeded the period initially granted apply to regularise their situation, provided the application is made within sixty calendar days of the authorised period expiring. Article 146 attaches a fine to that regularisation, expressed in the law as a multiple of a daily reference amount rather than a fixed peso figure, so the amount payable depends on the unit in force when you pay.

Before you book, and before you fly

Check three things on INM's own pages rather than on any aggregator. First, which of the two visa lists your nationality appears on today. Second, whether one of the alternative documents applies to you, and whether it is still valid on your travel dates. Third, whether you are entering by air or land, because that decides whether a form exists at all.

Then, on arrival, photograph the passport stamp before you leave the immigration hall and read the departure date on it. If it gives you less time than your onward booking assumes, raise it there and then with the officer or at the INM office in the terminal, while you are still inside the process, and ask what your options are for the stay you actually need. This guide describes the general visitor route only, and does not cover residence permits, work authorisation, or the specific rules for regional border visitors in Mexico's southern border states.