Iran observes the Islamic dress code, which calls for women to cover their hair, neck and arms. This doesn’t mean you need to cover up your entire body with a chador (a black cloth that covers the whole body), you simply need to cover your head and hair with a hijab.
It is recommended to the female travellers to wear long, flowing tops or tunics and cardigans that run below the waistline. Baggy pants and covered shoes are also highly recommended. Many Iranian women also wear a manteau, or trench coat with long sleeves, that usually falls below the knee. It’s a false belief that women face limitation in the colour of their clothing; there are absolutely no restrictions in colour when it comes to the dress code.
For men, shorts and flip-flops are not regularly used in the public. Stick to t-shirts and long pairs of pants or trousers, as well as covered shoes. You’ll need to pay special attention at the airport and at land border crossings — be sure to put on a long-sleeved shirt, pants and proper shoes.
Despite the strict dress code, you’ll be surprised to find women pushing the limits (especially in the big cities) by wearing their hijab halfway back on their head, and tight, colourful leggings or skinny jeans. Though these are not, of course, in line with the strict Islamic code, the government does not react harshly and suffices to the advices given now and then of the necessity of correct dressing.
Many female travellers tend to be concerned about the dress code, which is understandable as it’s something that some of western people aren’t used to. You would be a little worried prior to your trip, but you'll get used to the headscarf and baggy clothes just after an hour or so of crossing into the border. Everyone is dressing that way, so you'll feel natural and I blended in right away.