"What does it profit my brethren, if someone says they have faith but does not have works, can faith save him?" The IMPLIED answer here is "No" because he goes on to say "Faith by itself, if it does not have works, IS DEAD" (James 2:17).
So judge for yourself from scripture, "Someone will say "You have faith and I have works, show me your faith WITHOUT your works and I will show you my faith BY MY WORKS (James 2: 18)
Some users seem to think that water baptism is salvation by works, yet Jesus told us to preach the gospel to every creature and baptize those who believe, so I don't believe water baptism is salvation by works, ESPECIALLY SINCE BAPTISM IS FROM HEAVEN AND NOT OF MEN (Matthew 21:25) and considering Jesus, Peter, Paul, Phillip etc didn't hesitate to baptize those who believed straight away, upon their confession of faith.
Jesus told us, "He who believes AND IS BAPTISED shall be saved, but he who does not believe shall be damned" (Mark 16:16). Jesus Himself also said, "UNLESS" - that's a condition of salvation - "Unless a man is born (again) John 3:3) of WATER (I believe that's baptism) and Spirit (I believe that's Holy Spirit) he CANNOT ENTER GOD'S KINGDOM (John 3:5)
So yes, Jesus taught salvation is by grace not works but not ONLY grace; that word "alone" however has been added to the Bible by men. It isn't there, because salvation is also through God's mercy according to Titus 3:5 as well as by His grace we have been saved through faith AND THAT NOT OF OURSELVES, it is the gift of God, not of works lest any man should boast (Ephesians 2: 8 & 9).