TS2Vec is a self-supervised representation learning framework designed to generate general-purpose vector representations of time series data across arbitrary semantic levels. The framework employs hierarchical contrastive learning over augmented context views to capture multiscale temporal dynamics, producing fine-grained contextual embeddings for individual timestamps. These timestamp-level representations can be flexibly aggregated to encode sub-sequences or complete time series without requiring fixed-length inputs. Because the embeddings are learned in an unsupervised manner, they provide versatile features that can be directly applied to diverse downstream tasks, including time series classification, forecasting, and anomaly detection.