---
title: "Clean Phone Numbers in TYPO3: Why We Built EXT:phone_number"
url: "https://b13.com/knowledge/clean-phone-numbers-in-typo3"
description: "TYPO3 stores phone numbers as tel: links, but doesn’t format them for output. Meet EXT:phone_number, a Fluid ViewHelper for clean, consistent numbers."
image: "https://b13.com/fileadmin/_processed_/3/4/csm_EXTphonenumber_Sharing_93e8e87199.png"
date: 2026-07-31
modified: 2026-08-19
lastUpdated: 2026-08-19
---

# Clean Phone Numbers in TYPO3: Why We Built EXT:phone_number

[ TYPO3 ](https://b13.com/knowledge/typo3) [ Open Source ](https://b13.com/knowledge/open-source)

 Clean Phone Numbers in TYPO3: Why We Built EXT:phone\_number
==============================================================

 A small Fluid ViewHelper that turns messy input into consistent, standardized output

![](https://b13.com/fileadmin/_processed_/a/d/csm_david_5ce18d41e2.jpg)David Steeb

  11 August 2026

 [ RSS Feed ](https://b13.com/rss.xml)

  ![A purple graphic featuring a smartphone icon with three horizontal bars, surrounded by illustrations of vintage telephones.](https://b13.com/fileadmin/_processed_/2/5/csm_EXTphonenumber_Headerbild_7b18829c3c.webp)

TYPO3’s link wizard has had a dedicated Phone link type for a while now, and used consistently it’s genuinely useful: editors store phone numbers as proper tel: links, so the linking itself is correct and reliable. You’ve done the hard part—getting everyone to enter their numbers the right way.

The catch is the frontend. Once the number is stored correctly, you still have to decide how it should actually look on the page—full international form, national form, following DIN 5008—and TYPO3 doesn’t format it for you. The same stored number might need to appear one way in your imprint and another way in the footer.

This is where our little extension phone\_number comes in. It does one thing: it takes the phone number an editor has already stored—as a tel: link or a raw string—and formats it for output in the frontend. In this post I’ll explain the problem it solves and how to use it.

   Why the Output Format Matters
-------------------------------

What visitors actually read is the number printed on the page, and that’s where consistency counts. A number shown three different ways across three pages chips away at the polish of an otherwise clean site.

International visitors expect a predictable format, and in Germany the DIN 5008 standard sets clear rules for how a number should be written. Depending on the context you might want the full international form (+49 711 3400810) in your imprint and the shorter national form (0711 3400810) in a footer—ideally from the exact same stored number, without touching the backend.

Doing that formatting by hand in every template doesn’t scale. Each one ends up with its own little bit of logic, and over time you get exactly the kind of wild growth we try to avoid: many slightly different solutions to the same problem.

    ![A stylized smartphone icon with signal bars, set against a purple and orange gradient background.](https://b13.com/fileadmin/_processed_/e/e/csm_sharing-ext-PhoneNumber-S-20260803-061023_6f7581e12f.webp)

 Our Solution: A Small ViewHelper Powered by libphonenumber
------------------------------------------------------------

The idea behind phone\_number is deliberately narrow: one Fluid ViewHelper that takes a raw phone number or a tel: URI and formats it into a clean international or national number. One line in your template, consistent output everywhere.

Installation works as usual via Composer:

  ```
1<br></br>
```

```
composer req b13/phone-number<br></br>
```

  Then register the namespace in your Fluid template:

  ```
1<br></br>2<br></br>3<br></br>4<br></br>
```

```
<html<br></br>  <span class="hljs-attribute">data-namespace-typo3-fluid</span>=<span class="hljs-string">"true"</span><br></br>  xmlns:<span class="hljs-attribute">phone</span>=<span class="hljs-string">"http://typo3.org/ns/B13/PhoneNumber/ViewHelpers"</span><br></br>><br></br>
```

  From there it’s a one-liner. International format is the default:

  ```
1<br></br>
```

```
<phone:<span class="hljs-keyword">format</span> <span class="hljs-keyword">value</span>="tel:+497113400810" /><br></br>
```

  Need the national format instead? Flip one argument:

  ```
1<br></br>
```

```
<phone:<span class="hljs-keyword">format</span> <span class="hljs-keyword">value</span>="tel:+497113400810" <span class="hljs-type">national</span>="1" /><br></br>
```

  It’s not limited to German numbers, either. Pass a US number and libphonenumber formats it the American way:

  ```
1<br></br>
```

```
<phone:<span class="hljs-keyword">format</span> <span class="hljs-keyword">value</span>="tel:+12125550123" /><br></br>
```

  Switch to `national="1"` and you get (212) 555–0123—the format US readers expect.

The country comes from the number itself: the +1 tells libphonenumber it’s a US number, so the right format follows automatically—independent of your site’s language. The defaultRegion argument (more on it below) only kicks in for numbers stored without a country code, telling the parser which country to assume.

And if a number is stored as a plain string rather than a `tel:` link, it normalizes that too:

  ```
1<br></br>
```

```
<phone:<span class="hljs-keyword">format</span> <span class="hljs-keyword">value</span>="+49 (0) 711 34008-10" /><br></br>
```

  This is the case the extension is really built for: a field defined as TCA `type=link` with `allowedTypes=telephone`—the Phone link type from the wizard—hands you a tel: URI, and the ViewHelper turns it straight into clean output. The number an editor picks in the backend is the number your visitor sees, cleanly formatted, every time.

   The Arguments, at a Glance
----------------------------

The ViewHelper keeps its options short and predictable:

- `value`—the phone number or `tel:` link to format. Required.
- `defaultRegion`—the region used to parse numbers that come without a country code. Defaults to DE, and it only matters for those bare numbers—so set it to your company’s home country rather than the site’s language (the English site of a French company still wants FR here).
- `national`—format the number in national style (0711 …) instead of international. Defaults to off.

   Requirements
--------------

EXT:phone\_number runs on PHP 8.1 and supports TYPO3 12, 13, and 14. It’s open source under GPL-2.0-or-later, and the number parsing is handled by libphonenumber-for-php-lite—so you get battle-tested formatting rules without pulling in a heavy dependency.

   Conclusion
------------

Phone numbers are a small detail, but small details are what make a site feel finished. Instead of formatting them by hand in every template, EXT:phone\_number gives you one consistent, reusable way to do it: install the extension, register the namespace, add one ViewHelper, and your numbers just look right.

Documentation and source code are available on GitHub: <https://github.com/b13/phone-number>

  **Got a tricky formatting case?**

Whether you’re cleaning up phone numbers across a large TYPO3 installation or fine-tuning the details on a single site, we’re happy to help. If you’d like support with EXT:phone\_number or your TYPO3 project in general, feel free to get in touch with us.

 [ Let’s connect ](https://b13.com/lets-connect)

  ###  Written by:

 ![Bild von David Steeb](https://b13.com/fileadmin/_processed_/a/d/csm_david_cf042ebb7f.webp)

b13 Founder and CEO, David, is someone you’ll meet if you’re thinking about working with our agency. He is constantly learning new skills and is an influential part of our cutting-edge frontend practice.

 David Steeb  CEO

 [ more from David Steeb ](https://b13.com/team/david-steeb)

  Related Articles
------------------

- ![Cartoon trophy character surrounded by hands giving thumbs up and a heart gesture, set against a gear-patterned background.](https://b13.com/fileadmin/_processed_/f/7/csm_T3ppy_Design_Kit_Headerbild_b51eb9dc31.webp)

    ###  T3ppy Gives TYPO3 a Friendly Face

     06 August 2026 | Florian “Flix” Keitgen

     TYPO3 is powerful—but it doesn’t have to feel impersonal. Meet T3ppy, our friendly companion for the backend.

     [ Read more: T3ppy Gives TYPO3 a Friendly Face ](https://b13.com/knowledge/t3ppy-design-kit)
- ![Gavel labeled "AI" on a circuit-patterned background with yellow stars, symbolizing regulation or legislation related to artificial intelligence in the EU.](https://b13.com/fileadmin/_processed_/1/0/csm_EUAIAct_Headerbild_510724b3de.webp)

    ###  AI Content in TYPO3: Labelling Needs Accountability

     02 August 2026 | Benni Mack

     The EU AI Act brings the origins of AI-generated content into focus. AI Label marks AI-generated and AI-edited content in TYPO3 and records who signed off the published version—for…

     [ Read more: AI Content in TYPO3: Labelling Needs Accountability ](https://b13.com/knowledge/ai-content-in-typo3-labelling-needs-accountability)
- ![Hands holding puzzle pieces are positioned around a partially completed puzzle depicting a computer interface.](https://b13.com/fileadmin/_processed_/d/7/csm_StopBuyingPlatforms_Headerbild_8a41a82f8a.webp)

    ###  Stop Buying Platforms. Start Building Ecosystems.

     09 June 2026 | David Steeb

     The first TYPO3 Summit North America opened with a keynote that reframes how enterprise teams should think about content management—from platforms to ecosystems, from vendor…

     [ Read more: Stop Buying Platforms. Start Building Ecosystems. ](https://b13.com/knowledge/stop-buying-platforms-start-building-ecosystems)
- ![Colorful fish illustrations surround a central logo that reads "TYPO3 Summit.](https://b13.com/fileadmin/_processed_/4/3/csm_NorthAmericaSummit_Headerbild_5fbbbbb529.webp)

    ###  Notes from Atlanta—What the First TYPO3 Summit North America Says About the Next Decade of Enterprise CMS

     22 May 2026 | David Steeb

     Field report from the first TYPO3 Summit North America in Atlanta. On governance that can’t be acquired, predictable seven-year lifecycles, the FAIR distribution layer, and why the…

     [ Read more: Notes from Atlanta—What the First TYPO3 Summit North America Says About the Next Decade of Enterprise CMS ](https://b13.com/knowledge/atlanta-typo3-summit-north-america-enterprise-cms)
- ![A rocket labeled "V14" launches into the sky, surrounded by a group of people celebrating with raised arms.](https://b13.com/fileadmin/_processed_/3/d/csm_v14_Celebration_Headerbild_3d4170fdc5.webp)

    ###  Happy Release Day TYPO3 v14: Why This Release Shows the True Strength of Open Source

     21 April 2026 | Florian “Flix” Keitgen

     TYPO3 v14 improves workflows for editors, marketing teams, and developers—and shows how community-driven open source creates real impact.

     [ Read more: Happy Release Day TYPO3 v14: Why This Release Shows the True Strength of Open Source ](https://b13.com/knowledge/happy-release-day-typo3-v14-why-this-release-shows-the-true-strength-of-open-source)
- ![Four file folders displaying a bar graph with orange bars, set against a light blue background with abstract document outlines.](https://b13.com/fileadmin/_processed_/7/2/csm_PageInfoTabs_Headerbild_1e3eda44e5.webp)

    ###  Taming the Page Module Header—Why We Built EXT:page\_info\_tabs

     31 March 2026 | David Steeb

     When multiple TYPO3 extensions add content to the page module header, things quickly become messy. EXT:page\_info\_tabs structures everything into clean Bootstrap tabs, with zero…

     [ Read more: Taming the Page Module Header—Why We Built EXT:page\_info\_tabs ](https://b13.com/knowledge/taming-the-page-module-header-why-we-built-extpage-info-tabs)
- ![Colorful palm leaves surround a central circular logo featuring a stylized design in orange and white, set against a light background.](https://b13.com/fileadmin/_processed_/3/a/csm_CMSflorida_Headerbild_7f47320b93.webp)

    ###  CMS Kickoff 2026: Perspectives on AI, Open Source, and Digital Sovereignty

     19 January 2026 | David Steeb

     CMS Kickoff 2026 in Florida brought together agencies, CMS experts, and open source communities to discuss AI, digital sovereignty, and the future of content management systems…

     [ Read more: CMS Kickoff 2026: Perspectives on AI, Open Source, and Digital Sovereignty ](https://b13.com/knowledge/cms-kickoff-2026)
- ![User interface design featuring a dark sidebar with navigation options and a central content area with placeholder text.](https://b13.com/fileadmin/_processed_/6/6/csm_V14BackendUX_Headerbild_6dcecb335f.webp)

    ###  Designing TYPO3 14’s Backend: Our Vision for a Modern, Expandable Foundation

     12 January 2026 | Laura Heine

     b13 is redesigning TYPO3’s backend for version 14 to feel modern, work faster, maintain user context, and create an expandable foundation that can evolve for years to come.

     [ Read more: Designing TYPO3 14’s Backend: Our Vision for a Modern, Expandable Foundation ](https://b13.com/knowledge/designing-typo3-14s-backend-our-vision-for-a-modern-expandable-foundation)
- ![A hand holds up a golden trophy with a logo, set against a blurred background of a building.](https://b13.com/fileadmin/_processed_/8/c/csm_ContainerAward_Headerbild_2a5154cdcb.webp)

    ###  TYPO3 Awards: Container Extension wins “Best TYPO3 Extension”

     28 November 2025 | Florian “Flix” Keitgen

     The Container Extension by Achim Fritz (b13) wins the TYPO3 Award 2025. A recognition for open source, clarity, and true TYPO3 DNA.

     [ Read more: TYPO3 Awards: Container Extension wins “Best TYPO3 Extension” ](https://b13.com/knowledge/typo3-awards-container-extension-wins-best-typo3-extension)
- ![Colorful sneakers are repeated in a pattern, with a central logo featuring "TYPO3 Code Sprint."](https://b13.com/fileadmin/_processed_/6/c/csm_CodesprintGenf25_Headerbild_c44149748c.webp)

    ###  Coding, Collaboration, and Community: My Week at the TYPO3 v14 Feature Sprint in Geneva

     05 November 2025 | Oliver Bartsch

     Five days, 14 contributors, countless ideas—and 55 patches created! Our team at b13 joined the TYPO3 v14 Feature Sprint in Geneva to push key improvements for backend UX, APIs, and…

     [ Read more: Coding, Collaboration, and Community: My Week at the TYPO3 v14 Feature Sprint in Geneva ](https://b13.com/knowledge/coding-collaboration-and-community-my-week-at-the-typo3-v14-feature-sprint-in-geneva)