I know Switzerland declared itself as neutral but what stopped hitler? He had already broken a lot of rules
Here is a short little post I wrote as part of a larger post on neutral nations in WW2:
As for Switzerland, the Germans considered it and even went as far as planning operation Tannebaum, an invasion of Switzerland. Invasion routes were planned and terrain was studied but Hitler never gave the operation a go ahead. Hitler felt that Switzerland could be erased once the Soviet Union and Britain were destroyed, but since that didn't happen Switzerland survived.
Source:
A World At Arms by Gerhard Weinberg