Recent research with face-to-face groups found that a measure of general group effectiveness (called "collective intelligence") predicted a group's performance on a wide range of different tasks. The same research also found that collective intelligence was correlated with the individual group members' ability to reason about the mental states of others (an ability called "Theory of Mind" or "ToM"). Since ToM was measured in this work by a test that requires participants to "read" the mental states of others from looking at their eyes (the "Reading the Mind in the Eyes" test), it is uncertain whether the same results would emerge in online groups where these visual cues are not available. Here we find that: (1) a collective intelligence factor characterizes group performance approximately as well for online groups as for face-to-face groups; and (2) surprisingly, the ToM measure is equally predictive of collective intelligence in both face-to-face and online groups, even though the online groups communicate only via text and never see each other at all. This provides strong evidence that ToM abilities are just as important to group performance in online environments with limited nonverbal cues as they are face-to-face. It also suggests that the Reading the Mind in the Eyes test measures a deeper, domain-independent aspect of social reasoning, not merely the ability to recognize facial expressions of mental states.