Keep souvenir stamps out of your passport
A separate travel notebook makes a better home for novelty stamps and avoids questions about an official document.
Put souvenir stamps in a notebook, postcard or a dedicated souvenir passport. Your real passport is an official travel document, and a tourist-office stamp is not the same thing as an immigration stamp.
The US State Department's passport-care guidance says unofficial novelty or souvenir stamps are not allowed and may cause problems when travelling. Other passport issuers have their own rules, so check yours rather than relying on a souvenir seller's assurance.
A keepsake is not an entry record
A stamp from a tourist attraction does not prove that you passed border control or left Schengen. This matters in places such as San Marino, where the appeal of adding another country to a collection can be confused with immigration formalities.
If your itinerary is close to a stay limit, work from the actual travel dates and the relevant border rules. Our microstate day-count guide explains why a casual visit should not be used as a visa workaround.
If you already have an unofficial stamp
Do not erase it, cover it with a sticker or remove the page. Altering the document further can create additional problems. Contact the passport issuer, describe what was added and ask whether replacement is needed before your next journey.
Be precise about where the mark is and whether it affects personal details, security features or an existing visa. The answer can depend on the document and the damage, so another traveller's experience is not a reliable guarantee.
Allow time for any replacement and for passport-linked permissions that may then need updating. Keep the souvenir tradition going in a small notebook: you can add tickets, dates and notes there without affecting the document you need to get home.