Carboxylic acid can be distinguish form other funtional group on the basis of sodium bicarbonate test.
If NaHCO3 is added to the aqueous solution of HCHO and HCOOH separately, Brisk effervescence of CO2 is observed from HCOOH solution but not from HCHO solution.
HCOOH + NaHCO3 → HCOONa + CO2 + H2O
Moreover,
HCOOH being an acid is capable of turning blue litmus to red, whereas no such change is observed in formaldehyde.