Carbon nanofoam is one of the carbon allotropes having sp2 and sp3 hybridized carbon, with graphite or non-graphite-like structures, a stable framework, and very low density. This study aims to synthesize carbon nanofoam by chemical vapor deposition using an Agar/NaCl catalyst and Ar/C2H2 gases at 700°C. The success of the synthesis was analyzed using FTIR and SEM-EDX analysis. The carbon nanofoam obtained was hydrophobic. The FTIR spectra show absorption at wavenumber 3445, 2921, and 1527 cm−1, respectively, indicating the presence of hydroxyl groups, aliphatic C-H, and C=C stretching. However, its FTIR spectra indicate the absence of hydrophilic groups, such as covalent-bonded oxygen-containing functional groups. The SEM image shows the interconnected framework with irregular pores. The elemental analysis using EDX shows that the prepared CNF contains C and O elements of 92.45 and 7.6%, respectively. The prepared carbon nanofoam shows ascorbic acid slowing release in its drug carrier application due to its large porosity and surface area.