The electrochemical stability of self-assembled monolayers was greatly enhanced by using room-temperature ionic liquids as media.