<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tools on HEUSSER.PRO</title><link>https://heusser.pro/categories/tools/</link><description>Recent content in Tools on HEUSSER.PRO</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 16 Jul 2026 12:35:05 +0000</lastBuildDate><atom:link href="https://heusser.pro/categories/tools/index.xml" rel="self" type="application/rss+xml"/><item><title>Introducing Digits - A Web App to Format any Phone Number Correctly</title><link>https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/</link><pubDate>Thu, 16 Jul 2026 12:35:05 +0000</pubDate><guid>https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/</guid><description>&lt;img src="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/cover.png" alt="Featured image of post Introducing Digits - A Web App to Format any Phone Number Correctly" />&lt;p>Any Teams Phone (or traditional PBX) admin deals knows the problem. We deal with phone numbers &lt;em>a lot&lt;/em> but in logs or API requests, these numbers are typically just a long string like &lt;code>+12025550123&lt;/code> and not something that is easily readable by humans like &lt;code>+1 202 555 0123&lt;/code>.&lt;/p>
&lt;p>As long as no human needs to read a number, an E.164 number (no spaces or formatting) is fine. However, once you need to read that number, it&amp;rsquo;s a hundred times more easy if the number is split up in segments. Luckily any half-way decent software already does this. Your iPhone does it and so does Teams.&lt;/p>
&lt;p>&lt;img src="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image.png"
width="406"
height="499"
srcset="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image_hu_80c17e41cc70b62f.png 480w, https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image_hu_89ccde56122fe07f.png 1024w"
loading="lazy"
decoding="async"
alt="Example of formatted work phone number in Teams"
class="gallery-image"
data-flex-grow="81"
data-flex-basis="195px"
>&lt;/p>
&lt;p>This is not a new topic for me as I&amp;rsquo;ve written about using Google&amp;rsquo;s &lt;a class="link" href="https://github.com/google/libphonenumber" target="_blank" rel="noopener"
>libphonenumber&lt;/a> &lt;a class="link" href="https://heusser.pro/p/prettify-and-sync-teams-phone-numbers-to-azure-ad-e973755f83d5/" >before&lt;/a>. But in that blog post, I showed how to format numbers locally using the Python port of that library. While that works, it might not be the best way for scripts that are ran by different team members as all of them would need to have Python and the phonenumbers library installed.&lt;/p>
&lt;h2 id="digits-api">Digits API
&lt;/h2>&lt;p>Let&amp;rsquo;s say your team has a script that provisions user accounts and sets the Entra ID &lt;code>BusinessPhones&lt;/code> property but you want to have a prettily formatted number instead of just a plain E.164 string. In that case you can just use the Digits API to get a formatted number.&lt;/p>
&lt;h3 id="request-example">Request Example
&lt;/h3>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">Invoke-RestMethod&lt;/span> &lt;span class="n">-Method&lt;/span> &lt;span class="n">Post&lt;/span> &lt;span class="n">-Uri&lt;/span> &lt;span class="s2">&amp;#34;https://digits.dialtoneapps.com/api/FormatPhoneNumber&amp;#34;&lt;/span> &lt;span class="n">-ContentType&lt;/span> &lt;span class="s2">&amp;#34;application/json&amp;#34;&lt;/span> &lt;span class="n">-Body&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="vm">@&lt;/span>&lt;span class="p">{&lt;/span> &lt;span class="n">PhoneNumber&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="s2">&amp;#34;+12025550123&amp;#34;&lt;/span> &lt;span class="p">}&lt;/span> &lt;span class="p">|&lt;/span> &lt;span class="nb">ConvertTo-Json&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="output-example">Output example
&lt;/h3>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;OriginalPhoneNumber&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;+12025550123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;CleanedPhoneNumber&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;+12025550123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;E164PhoneNumber&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;+12025550123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;InternationalPhoneNumberNoHyphens&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;+1 202 555 0123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;InternationalPhoneNumber&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;+1 202-555-0123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;NationalPhoneNumber&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;(202) 555-0123&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;CountryIsoCode&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;US&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;InvalidZeroAfterInternationalPrefixRemoved&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">false&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>As you can see, it also fixes invalid zeroes after the intl. prefix when somebody malformed a number as i.e. &lt;code>+44 0 20 xxxx xxxx&lt;/code> and will tell you if the number had to be fixed or not. See &lt;a class="link" href="#easter-eggs" >Easter Eggs&lt;/a> for more info on how to access the API reference.&lt;/p>
&lt;h2 id="web-app">Web App
&lt;/h2>&lt;p>If you just want to convert an E.164 number into a formatted number, simply head to &lt;a class="link" href="https://digits.dialtoneapps.com" target="_blank" rel="noopener"
>digits.dialtoneapps.com&lt;/a> and paste the number.&lt;/p>
&lt;p>&lt;img src="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-1.png"
width="707"
height="506"
srcset="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-1_hu_d858e2368222ad9.png 480w, https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-1_hu_fb936108a4ca3c81.png 1024w"
loading="lazy"
decoding="async"
alt="Digits Web App"
class="gallery-image"
data-flex-grow="139"
data-flex-basis="335px"
>&lt;/p>
&lt;p>You can also type a national number and select the intl. prefix manually.&lt;/p>
&lt;p>&lt;img src="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-2.png"
width="693"
height="144"
srcset="https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-2_hu_4bf32b714a4bc87.png 480w, https://heusser.pro/p/introducing-digits---a-web-app-to-format-any-phone-number-correctly-dveo8donxc5f/image-2_hu_61690901678e949c.png 1024w"
loading="lazy"
decoding="async"
alt="National number example"
class="gallery-image"
data-flex-grow="481"
data-flex-basis="1155px"
>&lt;/p>
&lt;h2 id="fair-use-limit">Fair Use Limit
&lt;/h2>&lt;p>Both the website and API are limited to 1 request per second per client. This is not intended for high-volume production use. In that case, I recommend to deploy your own Azure Function to achieve that. I&amp;rsquo;ll likely write a separate blog post on that soon. However, if you just need to format a number from time to time, it&amp;rsquo;s absolutely no problem to use the Digits API.&lt;/p>
&lt;h2 id="easter-eggs">Easter Eggs
&lt;/h2>&lt;p>I couldn&amp;rsquo;t help myself and add some fun easter eggs on the site. The only one I&amp;rsquo;ll disclose here is to type &lt;code>API&lt;/code> into the phone number field. That will take you to the API reference. Alternatively, you can also access the API reference directly at &lt;a class="link" href="https://digits.dialtoneapps.com/docs/api" target="_blank" rel="noopener"
>digits.dialtoneapps.com/docs/api&lt;/a>&lt;/p>
&lt;p>But do try to some well-known short numbers that don&amp;rsquo;t necessarily have something to do with telephony to find some hidden jokes.&lt;/p>
&lt;h2 id="under-the-hood">Under the Hood
&lt;/h2>&lt;p>The site is built using TypeScript and &lt;a class="link" href="https://storybooks.fluentui.dev/react/?path=/docs/concepts-introduction--docs" target="_blank" rel="noopener"
>Fluent UI React V9&lt;/a> and is hosted on &lt;a class="link" href="https://azure.microsoft.com/en-us/products/app-service/static?msockid=392c21fd33d0606d040034f3326861f4" target="_blank" rel="noopener"
>Azure Static Web Apps&lt;/a>. Even the Free SKU of Static Web Apps supports managed functions which is perfect because that&amp;rsquo;s what the Digits API is using. Let me know if you&amp;rsquo;re interested in a blog post about how to build and deploy web apps like this in the comments.&lt;/p></description></item></channel></rss>