In the present work, we give necessary and sufficient conditions on the graph of a right-angled Artin group that determine whether the group is subgroup separable or not. Also, we show that right-angled Artin groups are conjugacy separable. Moreover, we investigate the profinite topology of F 2 × F 2 and of the group L in [22], which are the only obstructions for the subgroup separability of th...