Alphanumeric CNPJ Test Example
The CNPJ.ws API is already prepared. Adapt your application calmly using this example and you'll be ready when the first alphanumeric registrations start being issued, in July 2026.
Use the sample CNPJ UKPVME1E8HI996 to test your integration with the new format
Starting in July 2026, Brazil's Federal Revenue Service (Receita Federal) may issue new CNPJ registrations in an alphanumeric format (with letters and numbers). Existing registrations will not be changed. If you want to understand how the new format works and how to calculate the check digits, see the article Alphanumeric CNPJ.
The CNPJ.ws API is already prepared for the new format. To help everyone adapting their systems, we created a sample alphanumeric CNPJ that you can use to test your check-digit validation and your API integration before the real registrations start circulating.
Sample CNPJ
UKPVME1E8HI996Formatted, it looks like this:
UK.PVM.E1E/8HI9-96Note its structure, which follows the same pattern as the current CNPJ:
| Part | Value | Description |
|---|---|---|
| Root | UKPVME1E | Identifies the company (8 alphanumeric characters) |
| Order | 8HI9 | Identifies the establishment (4 alphanumeric characters) |
| Check digits | 96 | Verification digits (2 characters, always numeric) |
The check digits 96 were calculated from the first twelve characters using modulo 11, exactly as described in the Alphanumeric CNPJ article. In other words, it is a valid CNPJ from the algorithm's standpoint — ideal for validating your implementation.
Testing check-digit validation
If you implemented the check-digit calculation in your system, run the algorithm over the first twelve characters (UKPVME1E8HI9) and verify that the result is 96. If it matches, your validation is correct.
To check manually, replace each character with its value (ASCII − 48), apply weights from 2 to 9 from right to left, and take the remainder of the division by 11 — the full step-by-step is in the calculation article.
Testing on the CNPJ.ws API
The sample CNPJ can be sent directly to the API, without special characters (no dots, slash, or dash).
Method: GET
Endpoint: https://publica.cnpj.ws/cnpj/UKPVME1E8HI996
cURL example
curl https://publica.cnpj.ws/cnpj/UKPVME1E8HI996JavaScript / Node.js example
Using fetch:
async function lookupCNPJ(cnpj) {
const response = await fetch(`https://publica.cnpj.ws/cnpj/${cnpj}`);
const data = await response.json();
console.log(data);
}
lookupCNPJ("UKPVME1E8HI996");Example with the consultar-cnpj package
We also maintain the official consultar-cnpj package (npm), which makes integration in Node.js easier. As of version 1.0.21 it already accepts alphanumeric CNPJ, so just update to the latest version:
yarn add consultar-cnpj
# or
npm i consultar-cnpj --saveconst consultarCNPJ = require("consultar-cnpj");
async function getCNPJ() {
// The token is optional — without it, the Public API is used (3 requests/min)
const token = "ENTER YOUR ACCESS TOKEN";
try {
const company = await consultarCNPJ("UKPVME1E8HI996", token);
console.log(company);
} catch (e) {
console.log(e);
}
}
getCNPJ();Important: because this is a fictitious CNPJ created for testing only, it does not return registration data for a real company. The goal is to validate that your application accepts, handles, and sends the alphanumeric format correctly across the entire chain — from the form to the API call. To receive real data, use an existing CNPJ.