Generating Jwt from JAVA backend doesn't work

When i pass a jwt that was generated from a java backend, i get a message “Message is manipulated”. But the jwt generated from Node works fine. I used an online tool to decode both token and thay seem to contain exactly the sam payload. Please i need help on this thanks