> For the complete documentation index, see [llms.txt](https://docs.cnpj.ws/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cnpj.ws/en/blog/alphanumeric-cnpj-test-example.md).

# Alphanumeric CNPJ Test Example

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](https://docs.cnpj.ws/blog/cnpj-alfanumerico).

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

```
UKPVME1E8HI996
```

Formatted, it looks like this:

```
UK.PVM.E1E/8HI9-96
```

Note 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](https://docs.cnpj.ws/blog/cnpj-alfanumerico) 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](https://docs.cnpj.ws/blog/cnpj-alfanumerico).

#### 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**

```shell
curl https://publica.cnpj.ws/cnpj/UKPVME1E8HI996
```

**JavaScript / Node.js example**

Using `fetch`:

```js
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`](https://github.com/cnpj-ws/consultar-cnpj) package ([npm](https://www.npmjs.com/package/consultar-cnpj)), 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:

```shell
yarn add consultar-cnpj
# or
npm i consultar-cnpj --save
```

```js
const 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cnpj.ws/en/blog/alphanumeric-cnpj-test-example.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
