Sequencing of the spa gene of methicillin-resistant Staphylococcus aureus (MRSA) is used for assigning spa types to e.g., detect transmission and control outbreaks. Traditionally, spa typing is performed by Sanger sequencing but has in recent years been replaced by whole-genome sequencing (WGS) in some laboratories. Spa typing by WGS involves de novo assembly of millions of short sequencing reads into larger contiguous sequences, from which the spa type is then determined. The choice of assembly program therefore potentially impacts the spa typing result. In this study, WGS of 1,754 MRSA isolates was followed by de novo assembly using the assembly programs SPAdes (with two different sets of parameters) and SKESA. The spa types were assigned and compared to the spa types obtained by Sanger sequencing, regarding the latter as the correct spa types. SPAdes with the two different settings resulted in assembly of the correct spa type for 84.8% and 97.6% of the isolates, respectively, while SKESA assembled the correct spa type in 98.6% of cases. The misassembled spa types were generally two spa repeats shorter than the correct spa type and mainly included spa types with repetition of the same repeats. WGS-based spa typing is thus very accurate compared to Sanger sequencing, when the best assembly program for this purpose is used. IMPORTANCE spa typing of methicillin-resistant Staphylococcus aureus (MRSA) is widely used by clinicians, infection control workers, and researchers both in local outbreak investigations and as an easy way to communicate and compare MRSA types between laboratories and countries. Traditionally, spa types are determined by Sanger sequencing, but in recent years a whole-genome sequencing (WGS)-based approach has become increasingly used. In this study, we compared spa typing by WGS using different methods for assembling the genome from short sequencing reads and compared to Sanger sequencing as the gold standard. We find substantial differences in correct assembly of spa types between the assembly methods. Our findings are therefore important for the quality of WGS based spa typing data being exchanged by clinical microbiology laboratories.