Free-base porphyrin molecules offer appealing options to tune the interaction with their environment via the manipulation of their inner hydrogen atoms and molecular conformation. Using scanning tunneling microscopy we show, through a systematic study, that the molecular conformation, electronic gap, wave function, and molecule-substrate interaction are modified by hydrogen switch or removal. Experimental results in combination with ab initio calculations provide an understanding of the underlying physical process.