BrazilianUtils 2.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package BrazilianUtils --version 2.2.0
                    
NuGet\Install-Package BrazilianUtils -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BrazilianUtils" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BrazilianUtils" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="BrazilianUtils" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BrazilianUtils --version 2.2.0
                    
#r "nuget: BrazilianUtils, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BrazilianUtils@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BrazilianUtils&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=BrazilianUtils&version=2.2.0
                    
Install as a Cake Tool

🇧🇷 Brazilian Utils

Utils library for specific Brazilian businesses.

Package Status Nuget
BrazilianUtils Build Status NuGet

Installation

# dotnet cli
> dotnet add package BrazilianUtils

# Package Manger
PM> Install-Package BrazilianUtils

Usage

CPF

Cpf.IsValid("52945557789"); // true

Cpf.IsValid("invalid-cpf"); // false
Cpf.IsValid(""); // false
Cpf.IsValid(null); // false

Cpf.Format("52945557789"); // 529.455.577-89

Cpf.Generate(); // 38041016588

CNPJ

Cnpj.IsValid("11886541000185"); // true

Cnpj.IsValid("invalid-cnpj"); // false
Cnpj.IsValid(""); // false
Cnpj.IsValid(null); // false

Cnpj.Format("11886541000185"); // 11.886.541.0001-85

Cnpj.Generate(); // 13401551551768

Boleto

Boleto.IsValid("00198.10001 00030.212237 00217.236553 1 35742800321323"); // true

Phone

Phone.IsValid("(51) 99922-3344"); // true
Phone.IsValid("51999223344"); // true

Cep

Cep.IsValid("92990000"); // true
Cep.IsValid("92990-000"); // true

Cep.Format("92990000"); // 92990-000

Utils

Helpers.OnlyNumbers("123abc"); // 123
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BrazilianUtils:

Package Downloads
Gc.Platform.Core

Biblioteca de Uso Geral.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 155 1/18/2026
2.2.0 405 11/11/2025
2.1.0 321 11/6/2025
2.0.0 42,509 10/27/2018
1.1.0 29,618 8/30/2018