Context : Aims : Our aim is to characterize the structure of protostellar envelopes on an individual basis and to correctly identify the embedded YSO population of L 1688 . Methods : Spectral maps of the HCO ^ { + } J = 4–3 and C ^ { 18 } O J = 3–2 lines using the HARP-B array on the James Clerk Maxwell Telescope and SCUBA 850 \mu m dust maps are obtained of all sources in the L 1688 region with infrared spectral slopes consistent with , or close to , that of embedded YSOs . Selected 350 \mu m maps obtained with the Caltech Submillimeter Observatory are presented as well . The properties , extent and variation of dense gas , column density and dust up to 1 ^ { \prime } ( \sim 7,500 AU ) are probed at 15 ^ { \prime \prime } resolution . Using the spatial variation of the gas and dust , together with the intensity of the HCO ^ { + } J = 4–3 line , we are able to accurately identify the truly embedded YSOs and determine their properties . Results : The protostellar envelopes range from 0.05 to 0.5 M _ { \odot } in mass . The concentration of HCO ^ { + } emission ( \sim 0.5 to 0.9 ) is generally higher than that of the dust concentration . Combined with absolute intensities , HCO ^ { + } proves to be a better tracer of protostellar envelopes than dust , which can contain disk and cloud contributions . Our total sample of 45 sources , including all previously classified Class I sources , several flat-spectrum sources and some known disks , was re-classified using the molecular emission . Of these , only 17 sources are definitely embedded YSOs . Four of these embedded YSOs have little ( 0.1–0.2 M _ { \odot } ) envelope material remaining and are likely at the interesting transitional stage from embedded YSO to T Tauri star . About half of the flat-spectrum sources are found to be embedded YSOs and about half are disks . Conclusions : The presented classification method is successful in separating embedded YSOs from edge-on disks and confused sources . The total embedded population of the Ophiuchus L 1688 cloud is found almost exclusively in Oph-A , Oph-B2 and the Ophiuchus ridge with only three embedded YSOs not related to these regions . The detailed characterization presented will be necessary to interpret deep interferometric ALMA and future Herschel observations .