How do I convert an existing mongodb instance that has sharding enabled for some of its collections to a replica set? I am able to do it the other way around, but I am not able to figure out how to add replication to existing sharded mongo instances.
You don't convert collections to a replica set. You convert (stand alone shard) node (where all databases and collections are) to the replica set.
Convert (stand alone) node to the replica set, follow these instructions.