PHPackages                             lacus/cpf-utils - 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-utils

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

lacus/cpf-utils
===============

Utility functions to deal with CPF (Brazilian personal ID)

1.1.1(3w ago)0348↓33.3%1MITPHPPHP &gt;=8.1CI passing

Since Oct 15Pushed 3w agoCompare

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

READMEChangelogDependencies (10)Versions (4)Used By (1)

[![cpf-utils for PHP](https://camo.githubusercontent.com/b5e6af454aa0582d721a5d5f347e2e50f8a4c0ce3303f3f7196054ecd107d10d/68747470733a2f2f62722d7574696c732e76657263656c2e6170702f696d672f636f7665725f6370662d7574696c732e6a7067)](https://camo.githubusercontent.com/b5e6af454aa0582d721a5d5f347e2e50f8a4c0ce3303f3f7196054ecd107d10d/68747470733a2f2f62722d7574696c732e76657263656c2e6170702f696d672f636f7665725f6370662d7574696c732e6a7067)

[![Packagist Version](https://camo.githubusercontent.com/7ff9551c9305503e4602019762f0ca7f2a56128e4da4dc12f19f5f38bcbee407/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616375732f6370662d7574696c73)](https://packagist.org/packages/lacus/cpf-utils)[![Packagist Downloads](https://camo.githubusercontent.com/f83a19d5c53141deaef1a0e046f962f6ebb8a2c3518497e4a7242dc6eaaa8d5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6c616375732f6370662d7574696c73)](https://packagist.org/packages/lacus/cpf-utils)[![PHP Version](https://camo.githubusercontent.com/24806fae4cc40b1fbc859d7aa5a2f131cd5b44b74da2c7bf4269353603528e3e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c616375732f6370662d7574696c73)](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)

Toolkit to deal with CPF data (Brazilian personal ID): validation, formatting and generation of valid IDs.

PHP Support
-----------

[](#php-support)

[![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)

```
$ composer require lacus/cpf-utils
```

Import
------

[](#import)

```
