Vegetative cells and heterocysts in the filamentous cyanobacterium Anabaena sp. PCC 7120 were observed by soft X-ray microscopy. Carbon-to-nitrogen (C/N) ratio of each cell was estimated by the difference of the absorbance of the images below and above the nitrogen K-edge absorption. It was revealed that the C/N ratios in vegetative cells and heterocysts are 4.54 and 2.46, respectively.