The present study aimed to investigate the role of attachment styles and gender among different online addictions (social media addiction, online gaming addiction, and internet addiction) among adolescents and young adults via an online survey. The participants comprised 943 Iranian students (440 females) selected by multi-stage cluster sampling. The survey included the nine-item form of the Problematic Internet Use Questionnaire (Laconi et al., 2019), nine-item Internet Gaming Disorder Scale-Short Form (Pontes & Griffiths, 2015), Bergen Social Media Addiction Scale (Andreassen et al., 2016), and Parent and Peer Attachment Styles Questionnaire (Gullone & Robinson, 2005). The results showed that online addictions were negatively correlated with secure attachment style, while insecure styles were positively correlated with all three types of online addiction. The results also showed that young adults were more involved in online activities, online addictive behaviors increased with age, and online gaming addiction was more prevalent among males than females. These findings indicate that individuals with a secure attachment style are less susceptible to online addictions and individuals with an insecure attachment style report more online addiction.