The nematode Caenorhabditis elegans secretes a family of water-soluble small molecules, known as the ascarosides, into its environment and uses these ascarosides in chemical communication. The ascarosides are derivatives of the 3,6-dideoxysugar ascarylose, modified with different fatty acid-derived side chains. C. elegans uses specific ascarosides, which are together known as the dauer pheromone, to trigger entry into the stress-resistant dauer larval stage. In addition, C. elegans uses specific ascarosides to control certain behaviors, including mating attraction, aggregation, and avoidance. Although in general the concentration of the ascarosides in the environment increases with population density, C. elegans can vary the types and amounts of ascarosides that it secretes depending on the culture conditions under which it has been grown and its developmental history. Here, we describe how to grow high-density worm cultures and the bacterial food for those cultures, as well as how to extract the culture medium to generate a crude pheromone extract. Then, we discuss how to analyze the types and amounts of ascarosides in that extract using mass spectrometry and NMR spectroscopy.