This correlational study investigated the relationship between cognitive aptitudes and online and offline processing of L2 syntactic structures. As a measure of online processing, the study used a self-paced reading task. To tap into offline L2 knowledge, it employed an untimed grammaticality judgment task (GJT). The main analyses focused on the correct placement of relative pronouns. The supplementary analyses were carried out on a range of other structures used as fillers in the GJT. In terms of cognitive aptitudes, the study considered the role of explicit learning aptitude and working memory in the processing of L2. Explicit aptitude was operationalized as an ability to infer rules of a new language and measured by the LLAMA F task, and working memory was measured by a digit span task. Moreover, the design included a measure of general L2 proficiency. The results showed that L2 learners' scores in the GJT were positively related to their explicit language aptitude. However, this type of relationship was observed only for ungrammatical items. In contrast, working memory was not a significant predictor of the performance on the GJT. As regards online processing, no links were found between the predictor variables and participants' sensitivity to errors in the self-paced reading task. Taken together, the results corroborate the role of explicit learning abilities in offline processing of L2 grammar. Additionally, supplementary analyses suggest that this relationship may hold even when general L2 proficiency is controlled for.