The characteristic features of stem-loop structured probes make them robust tools to detect targets with high sensitivity and selectivity. The basis of the hairpin based sensors operation is a conformational change that occurs upon hybridization of target with stem-loop probe. The design of the stem-loop probe has an important role in target recognition. Therefore, we designed a label-free stem loop probe for targeting miR-21 as a cancer biomarker investigated by web-based tools; its thermodynamic parameters obtained by thermal UV spectroscopy. The efficiency of stem-loop structure opening in the presence of target and non-target sequences was evaluated by fluorescence spectroscopy and circular dichroism spectro-polarimetry. The results showed that the target sequence opens the structure of hairpin efficiently in comparison to non-target sequences. To optimize the stem-loop hybridization to its target, the buffer ionic strength was changed by adding different concentrations of NaCl, KCl and MgCl2. It was shown that buffering conditions have a significant role in loop structure opening and its optimization, led to an increase in sensitivity detection and have improved LOD from 60 pM to 45 pM.