In this article, we develop the theory of SAGBI bases in G-algebras and create a criterion through which we can check if a set of polynomials in a G-algebra is a SAGBI basis or not. Moreover, we will construct an algorithm to compute SAGBI bases from a subset of polynomials contained in a subalgebra of a G-algebra.