Study of the nematode Caenorhabditis elegans has provided important insights in a wide range of fields in biology. The ability to precisely modify genomes is critical to fully realize the utility of model organisms. Here we report a method to edit the C. elegans genome using the clustered, regularly interspersed, short palindromic repeats (CRISPR) RNA-guided Cas9 nuclease and homologous recombination. We demonstrate that Cas9 is able to induce DNA double-strand breaks with specificity for targeted sites and that these breaks can be repaired efficiently by homologous recombination. By supplying engineered homologous repair templates, we generated gfp knock-ins and targeted mutations. Together our results outline a flexible methodology to produce essentially any desired modification in the C. elegans genome quickly and at low cost. This technology is an important addition to the array of genetic techniques already available in this experimentally tractable model organism.