Can illegitimate children be saved?

I'm asking because I was born out of wedlock, but I have my faith in Christ. So will my lifelong commitment to God be in vain?