Cell encapsulation utilizing biodegradable material has promising outcomes for tissue engineering. From a long time ago, alginate has been generally utilized for drug delivery, cell transplantation and as a scaffold in biomedical applications. The aim of this study was the comparison of cell viability in the presence of two polymerizing ions: Ba2+ and Ca2+ to improvement the quality of alginate scaffold. For this purpose, WJMSCs after three passage were encapsulated in alginate scaffold in the presence of Ba2+ and ca2+. Cell viability was evaluated by WST-8 assay kit after 24, 48 and 72 hours. The results showed that encapsulated cells in the presence of Ca2+ had more viability than Ba2+. It was also found that using the WST-8 assay kit is a convenient and fast method for evaluation the viability of cells. It can be claimed that Calcl2 polymerizing solution provides more favorable conditions for cell viability compared to Bacl2 solution.