# Auth0|{user\_id } length

**URL:** <https://community.auth0.com/t/auth0-user-id-length/55371>\
**Category:** JWT.io\
**Tags:** user\_id, id\_token\
**Created:** [December 27, 2020, 1:42am UTC](https://community.auth0.com/t/auth0-user-id-length/55371 "2020-12-27T01:42:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![diego.alejandro.gome](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/diego.alejandro.gome/32/26521_2.png) [@diego.alejandro.gome](https://community.auth0.com/u/diego.alejandro.gome)\
**Post date:** [December 27, 2020, 1:42am UTC](https://community.auth0.com/t/auth0-user-id-length/55371/1 "2020-12-27T01:42:36Z")

</div>

I use Auth0 without social identity connection meaning all of my user\_id fields in the id token have a `auth0|{user_id }` pattern. I noticed the user\_id part is always a hex number so I want to strip the `auth0|` part and use the hex as a user ID in my application (obviously this has better performance vs string). Problem is this doesn’t fit in a “long” type (in Java nor database). Is there anyway I can modify the configs to make this number smaller so it would fit in a long?

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [December 27, 2020, 4:33pm UTC](https://community.auth0.com/t/auth0-user-id-length/55371/2 "2020-12-27T16:33:33Z")

</div>

Hi @diego.alejandro.gome

I don’t think you can do that.

Instead, if you can generate a unique ID for each user, you can store that in the app\_metadata and return it in the token, then use that to key into your DB.

John

---

<div class="post-metadata">

**Author:** ![diego.alejandro.gome](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/diego.alejandro.gome/32/26521_2.png) [@diego.alejandro.gome](https://community.auth0.com/u/diego.alejandro.gome)\
**Post date:** [December 27, 2020, 4:56pm UTC](https://community.auth0.com/t/auth0-user-id-length/55371/3 "2020-12-27T16:56:47Z")

</div>

I figured it out, I pad the hex number and use it as uuid.
