The popularity of 𝑘-mer-based methods has recently led to the development of compact 𝑘-mer-set representations, such as simplitigs/Spectrum-Preserving String Sets (SPSS), matchtigs, and eulertigs. These aim to represent 𝑘-mer sets via strings that contain individual 𝑘-mers as substrings more efficiently than the traditional unitigs. Here, we demonstrate that all such representations can be viewed as superstrings of input 𝑘-mers, and as such can be generalized into a unified framework that we call the masked superstring of 𝑘-mers. We study the complexity of masked superstring computation and prove NP- hardness for both 𝑘-mer superstrings and their masks. We then design local and global greedy heuristics for efficient computation of masked superstrings, implement them in a program called KmerCamel🐫 , and evaluate their performance using selected genomes and pan-genomes. Overall, masked superstrings unify the theory and practice of textual 𝑘-mer set representations and provide a useful framework for optimizing representations for specific bioinformatics applications.