# Format Numbers With Thousands Separators

**URL:** <https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839>\
**Category:** APIs & Integrations\
**Created:** [July 19, 2018, 5:18pm UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839 "2018-07-19T17:18:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmci](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jmci/32/13521_2.png) [@jmci](https://community.hubspot.com/u/jmci)\
**Post date:** [July 19, 2018, 5:18pm UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839/1 "2018-07-19T17:18:38Z")

</div>

I have created a new email module via the design tools. Within that module, I have created a field name `starting_price` that is configured as a number. I’d like to use said field in the HTML/Hubl with thousands separators.

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/7/6739eb09ba92dc003fe19f3803503afbdcf66b0d.png)

Screen Shot 2018-07-19 at 10.11.57 AM.png326x603 18.2 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/d/d0038e402d34aec0aeacad1672382fe80cab5c46.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/d/d0038e402d34aec0aeacad1672382fe80cab5c46.png))

When someone uses this module when creating a new marketing email, they are asked enter starting price but the number is not formatted with thousands separators. For example, if the price is $1,899, the user enters `1899` in the email field form (HubSpot adds the comma in the starting price input form field), but it’s also being displayed as `1899` in the email template.

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/b/dbd32221ad124a59c29311331bb698af4bfe82ed.png)

Screen Shot 2018-07-19 at 10.15.45 AM.png529x548 20 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/9/9c1834630298be6b8abe937d1dd428a5515cb452.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/9/9c1834630298be6b8abe937d1dd428a5515cb452.png))

I’d like to format the number to be formatted with thousands separators without asking the user to enter a `string` in the form input.

Thoughts?

Thanks!

---

<div class="post-metadata">

**Author:** ![jmci](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jmci/32/13521_2.png) [@jmci](https://community.hubspot.com/u/jmci)\
**Post date:** [July 23, 2018, 2:25pm UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839/2 "2018-07-23T14:25:33Z")

</div>

Any ideas or suggestions?

---

<div class="post-metadata">

**Author:** ![PaulAxonGarside](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/paulaxongarside/32/1529_2.png) [@PaulAxonGarside](https://community.hubspot.com/u/PaulAxonGarside)\
**Post date:** [July 26, 2018, 7:54am UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839/3 "2018-07-26T07:54:36Z")

</div>

I think you’ll have to go the string option. Ideally you’d store the number in the DB without the formatting and apply the formatting in the template.

---

<div class="post-metadata">

**Author:** ![Riadhoq](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/riadhoq/32/48852_2.png) [@Riadhoq](https://community.hubspot.com/u/Riadhoq)\
**Post date:** [August 26, 2019, 3:24pm UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839/4 "2019-08-26T15:24:51Z")

</div>

For anyone who’s still looking for the solution.

Hubl has some filters available: you can use format\_currency(“en-US”) for thousand separator. It’ll also add a “$” sign in front of the number.

if item.price = 2500

Ex: {{ item.price | format\_currency(“en-US”) }} ==\> output $2,500

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fcms%2Freference%2Fhubl%2Fhubl-supported-filters)**

---

<div class="post-metadata">

**Author:** ![John](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/john/32/43512_2.png) [@John](https://community.hubspot.com/u/John)\
**Post date:** [May 3, 2021, 8:35pm UTC](https://community.hubspot.com/t/format-numbers-with-thousands-separators/11839/5 "2021-05-03T20:35:17Z")

</div>

Unfortunately no easy way to do this other than combining the **format\_currency** and **replace** filters (kinda feel like there should be a **format\_number** filter)

`{{ my_number|format_currency('en-US')|replace('$', '') }}`
