PHPackages                             lacus/cpf-fmt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lacus/cpf-fmt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lacus/cpf-fmt
=============

Utility function to format CPF (Brazilian personal ID)

1.0.0(8mo ago)0401↓12.5%2MITPHPPHP &gt;=8.1CI passing

Since Oct 12Pushed 3w agoCompare

[ Source](https://github.com/LacusSolutions/br-utils-php_cpf-fmt)[ Packagist](https://packagist.org/packages/lacus/cpf-fmt)[ Docs](https://cpf-utils.vercel.app/)[ RSS](/packages/lacus-cpf-fmt/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (2)

[![cpf-fmt for PHP](https://camo.githubusercontent.com/d82257f897e16f7f3318a111216cde434e3c05389ff3064956c1e8e8c54dc1cc/68747470733a2f2f62722d7574696c732e76657263656c2e6170702f696d672f636f7665725f6370662d666d742e6a7067)](https://camo.githubusercontent.com/d82257f897e16f7f3318a111216cde434e3c05389ff3064956c1e8e8c54dc1cc/68747470733a2f2f62722d7574696c732e76657263656c2e6170702f696d672f636f7665725f6370662d666d742e6a7067)

[![Packagist Version](https://camo.githubusercontent.com/06db04ecf601a572e53e44f0f7fe48595214936175489359284ad1774f00acd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616375732f6370662d666d74)](https://packagist.org/packages/lacus/cpf-fmt)[![Packagist Downloads](https://camo.githubusercontent.com/e533a4a17b7b1d0e0264d7669780923ab53a7a37a59d79407b4128b7a4de1f8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6c616375732f6370662d666d74)](https://packagist.org/packages/lacus/cpf-fmt)[![PHP Version](https://camo.githubusercontent.com/163b27571e348ee4e09695d95510d701e873b313694ad0e641cb06a33101e95e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c616375732f6370662d666d74)](https://www.php.net/)[![Test Status](https://camo.githubusercontent.com/bc71a889730b33757624a7665d324206586beb2c64e6a2d2d32852e2b30f1df1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4c61637573536f6c7574696f6e732f62722d7574696c732d7068702f63692e796d6c3f6c6162656c3d63692f6364)](https://github.com/LacusSolutions/br-utils-php/actions)[![Last Update Date](https://camo.githubusercontent.com/3de9411599aeb23885d20d61de36d9b02a1b43618d8b4360e57fd371469c61cb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f4c61637573536f6c7574696f6e732f62722d7574696c732d706870)](https://github.com/LacusSolutions/br-utils-php)[![Project License](https://camo.githubusercontent.com/3831eac41446c923d630ebf80bfc848f862c79619ee4814821521ccf13dfef2a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c61637573536f6c7574696f6e732f62722d7574696c732d706870)](https://github.com/LacusSolutions/br-utils-php/blob/main/LICENSE)

Utility function/class to format CPF (Brazilian ID document).

[![PHP 8.1](https://camo.githubusercontent.com/d70e266076e28598d8ae3aeda67a004e4dc1f764f0d54e97ef142b529889496f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/d70e266076e28598d8ae3aeda67a004e4dc1f764f0d54e97ef142b529889496f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![PHP 8.2](https://camo.githubusercontent.com/6dab1427c2636572a765f9e0f332c0665ce863cbc46cece88aa44f747132c260/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/6dab1427c2636572a765f9e0f332c0665ce863cbc46cece88aa44f747132c260/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![PHP 8.3](https://camo.githubusercontent.com/2bace8bb56a21d62a4c1c2e2018eb2e83eff46e07cab21c26ca42feda0bdd46e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/2bace8bb56a21d62a4c1c2e2018eb2e83eff46e07cab21c26ca42feda0bdd46e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![PHP 8.4](https://camo.githubusercontent.com/cf871f594e557c5b9ae8715a2b7207b9b73686ee83156cd0308489979d0d84e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/cf871f594e557c5b9ae8715a2b7207b9b73686ee83156cd0308489979d0d84e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)Passing ✔Passing ✔Passing ✔Passing ✔Installation
------------

[](#installation)

```
# using Composer
$ composer require lacus/cpf-fmt
```

Import
------

[](#import)

```
