# Can I generate a JWT with Java and use Node.js to decode it?

**URL:** <https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147>\
**Category:** Get Help\
**Tags:** nodejs, jwt, java\
**Created:** [June 20, 2017, 10:07am UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147 "2017-06-20T10:07:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pravinkalbhor](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pravinkalbhor](https://community.auth0.com/u/pravinkalbhor)\
**Post date:** [June 20, 2017, 10:07am UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147/1 "2017-06-20T10:07:51Z")

</div>

I’m trying to decode the JWT in node server [npm install jsonwebtoken] which is created in java [io.jsonwebtoken / jjwt / 0.6.0] but getting invalid signature error.

Does anyone had experienced the same and found the solution then could you please share with the group.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [June 20, 2017, 3:31pm UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147/2 "2017-06-20T15:31:32Z")

</div>

The JWT token format is standardized and there are available libraries for a variety of programming languages and technology stacks so the answer to your question is yes, you can create a JWT in Java and consume it in a Node.js application.

For a quick list of the available libraries across different programming languages you can check the _Libraries_ section in [jwt.io](https://jwt.io).

In relation to the error in question, it’s likely some incorrect configuration in your code as you’re using third-party libraries which are used by others so any serious and obvious issues around decoding would likely already been detected and fixed.

Given this a generic situation related to JWT libraries you may also consider posting the question to more generalist forums like StackOverflow (which as a consequence have an increased audience of users) and be sure to include the necessary sample code that reproduces the issues.

---

<div class="post-metadata">

**Author:** ![pravinkalbhor](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pravinkalbhor](https://community.auth0.com/u/pravinkalbhor)\
**Post date:** [June 21, 2017, 6:33am UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147/3 "2017-06-21T06:33:57Z")

</div>

Thanks for the response. I will try to use different libraries and will post my findings soon… Thanks!

---

<div class="post-metadata">

**Author:** ![pravinkalbhor](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pravinkalbhor](https://community.auth0.com/u/pravinkalbhor)\
**Post date:** [June 21, 2017, 6:33am UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147/4 "2017-06-21T06:33:57Z")

</div>

Thanks for the response. I will try to use different libraries and will post my findings soon… Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/can-i-generate-a-jwt-with-java-and-use-node-js-to-decode-it/7147/5 "2018-03-02T05:54:46Z")

</div>


