Inspired by traditional pH papers, two types of ratiometric fluorescent pH sensors for neutral and alkaline pH ranges were developed in this study by using two fluorescent dyes, coumarin 6 (C6) and nile blue A (NB). These dyes were encapsulated into melamine-formaldehyde (MF) resin particles, which were then incorporated with polymer Nafion (Nf) or polyurethane hydrogel (PU) to prepare pH-sensing membranes. MF-C6 particles immobilized into polymer Nafion (i.e., MF-C6-Nf membrane) showed a dynamic ratiometric pH detection range of 4.5-7.5 through shift in fluorescence emission spectra at acidic and neutral pH solutions, as well as distinct color transition under normal visual sense from pink to yellow color. By contrast, MF-NB particles immobilized into polyurethane hydrogel (i.e., MF-NB-PU membrane) displayed a dynamic ratiometric fluorescence detection range of pH 9 - pH 12 via change in ratiometric fluorescence intensity at two emission band edges. The membrane also showed a clear change from blue to purple color under sunlight at high pH values. These pH-sensing membranes also exhibited high sensitivity, good reversibility, and stability. They were then applied to measure pH values in real urine samples and fermentation media.