A low-complexity and joint modulation format identification (MFI) and optical signal to noise ratio (OSNR) estimation scheme is proposed for flexible coherent receivers (FCRs) by using random forest (RF) combined with the amplitude histograms of pre-equalized signals. Numerical simulation and experiments demonstrate the proposed scheme can achieve good performance with very low complexity. Comprehensive simulation results of 16GBaud polarization multiplexed (PM) 4/8/16/32/64 quadrature amplitude modulation (QAM) not only prove RF-based MFI can obtain 100% accuracy at OSNR lower than that required for 20% forward error correction (FEC) limit, which is similar to deep neural network (DNN) and support vector machine (SVM), but also indicate the averaged mean absolute error (MAE) of OSNR estimation is superior to DNN and SVM. Moreover, the complexity of RF-based scheme is at least an order of magnitude lower than DNN and SVM. The performance is also experimentally investigated by 16GBaud P M - 4/16/32 QAM wavelength division multiplexing coherent systems. 100% MFI accuracy can also be achieved at OSNR lower than that required for 20% FEC limit and the averaged MAE is lower than DNN and SVM as well. The coexistent advantages of low-complexity and good performance make the proposed scheme have the potential to be embedded in FCRs.