# HubSpot usertoken: - formating

**URL:** <https://community.hubspot.com/t/hubspot-usertoken-formating/71753>\
**Category:** APIs & Integrations\
**Created:** [December 22, 2022, 7:50pm UTC](https://community.hubspot.com/t/hubspot-usertoken-formating/71753 "2022-12-22T19:50:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeterS72](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@PeterS72](https://community.hubspot.com/u/PeterS72)\
**Post date:** [December 22, 2022, 7:50pm UTC](https://community.hubspot.com/t/hubspot-usertoken-formating/71753/1 "2022-12-22T19:50:23Z")

</div>

Can someone provide more detail on the hubspotutk user token?

Specifically, approx how many characters long is it? Where can I find it in my browser? etc

---

<div class="post-metadata">

**Author:** ![ModuleMaestro](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/modulemaestro/32/32546_2.png) [@ModuleMaestro](https://community.hubspot.com/u/ModuleMaestro)\
**Post date:** [December 23, 2022, 7:40am UTC](https://community.hubspot.com/t/hubspot-usertoken-formating/71753/2 "2022-12-23T07:40:22Z")

</div>

Hi @PeterS72,

If you’re accessing a page that has the HubSpot tracking code you should be able to find this by opening up the Inspect tool and typing in **\_\_hsUserToken** in the Console. Another method, based on this Stack Overflow [response](https://stackoverflow.com/questions/10730362/get-cookie-by-name), is to run a getCookie function:

```lia-code-sample
function getCookie(name) {
 const value = `; ${document.cookie}`;
 const parts = value.split(`; ${name}=`);
 if (parts.length === 2) return parts.pop().split(';').shift();
}

getCookie('hubspotutk')

```

Checking for the length it seems it runs 32 characters long:

![ModuleMaestro_0-1671781004817.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/9/090e7d0b8f7fab5f14b4d245ee15339f907b4bd8.png)

I’ve tested this across a few sites with the tracking code on them and this seems consistent. Let me know if there’s anything else I can help clarify!

---

<div class="post-metadata">

**Author:** ![ChrisoKlepke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chrisoklepke/32/11213_2.png) [@ChrisoKlepke](https://community.hubspot.com/u/ChrisoKlepke)\
**Post date:** [December 23, 2022, 9:19am UTC](https://community.hubspot.com/t/hubspot-usertoken-formating/71753/3 "2022-12-23T09:19:42Z")

</div>

Thank you for the question and the response! I was wondering that myself not too long ago.
