Nanoporous silicon (n-PSi) with diverse morphologies was prepared on silicon (Si) substrate via photo-electrochemical etching technique. The role of changing current density (15, 30 and 45 mA cm-2) on the structure, morphology and optical properties was determined. As-prepared samples were systematically characterized using XRD, FESEM, AFM and photoluminescence measurements. Furthermore, the achieved n-PSi sample was used to make metal-semiconductor-metal (MSM) UV photodetector. The performance of these photodetectors was evaluated upon exposing to visible light of wavelength 530 nm (power density 1.55 mW cm-2), which exhibited very high sensitivity of 150.26 with a low dark current. The achieved internal photoconductive gain was 2.50, the photoresponse peak was 1.23 A W-1 and the response time was 0.49 s and the recovery time was 0.47 s. Excellent attributes of the fabricated photodetectors suggest that the present approach may provide a cost effective and simple way to obtain n-PSi suitable for sundry applications. © 2017 IOP Publishing Ltd.