# Alphanumeric CNPJ

As of **July 2026**, the Brazilian Federal Revenue Service (Receita Federal) may issue new CNPJ registrations in an **alphanumeric format** (letters and numbers). Existing registrations will **not** be changed.

The **CNPJ.ws API** is already prepared for this new format and accepts queries using **alphanumeric CNPJ**.

### Check Digit Calculation

The new alphanumeric CNPJ is composed of **14 characters**, just like the current one:

* The **first 12 characters** are alphanumeric
* The **last 2 characters** are numeric **check digits**

The check digits are calculated from the first twelve characters in **two steps**, using **modulus 11** and weights distributed from **2 to 9**.

#### First Check Digit Calculation

For each CNPJ character, you must assign the value from the **“Value for check digit calculation”** column according to the table below, or subtract **48 from the ASCII value**:

| Alphanumeric CNPJ | ASCII Value | Value for Check Digit Calculation |
| ----------------- | ----------- | --------------------------------- |
| 0                 | 48          | 0                                 |
| 1                 | 49          | 1                                 |
| 2                 | 50          | 2                                 |
| 3                 | 51          | 3                                 |
| 4                 | 52          | 4                                 |
| 5                 | 53          | 5                                 |
| 6                 | 54          | 6                                 |
| 7                 | 55          | 7                                 |
| 8                 | 56          | 8                                 |
| 9                 | 57          | 9                                 |
| A                 | 65          | 17                                |
| B                 | 66          | 18                                |
| C                 | 67          | 19                                |
| D                 | 68          | 20                                |
| E                 | 69          | 21                                |
| F                 | 70          | 22                                |
| G                 | 71          | 23                                |
| H                 | 72          | 24                                |
| I                 | 73          | 25                                |
| J                 | 74          | 26                                |
| K                 | 75          | 27                                |
| L                 | 76          | 28                                |
| M                 | 77          | 29                                |
| N                 | 78          | 30                                |
| O                 | 79          | 31                                |
| P                 | 80          | 32                                |
| Q                 | 81          | 33                                |
| R                 | 82          | 34                                |
| S                 | 83          | 35                                |
| T                 | 84          | 36                                |
| U                 | 85          | 37                                |
| V                 | 86          | 38                                |
| W                 | 87          | 39                                |
| X                 | 88          | 40                                |
| Y                 | 89          | 41                                |
| Z                 | 90          | 42                                |

Example:

<table data-full-width="false"><thead><tr><th width="84">CNPJ</th><th width="55">1</th><th width="55">2</th><th width="57">A</th><th width="56">B</th><th width="56">C</th><th width="55">3</th><th width="56">4</th><th width="55">5</th><th width="56">0</th><th width="55">1</th><th width="56">D</th><th width="56">E</th></tr></thead><tbody><tr><td>Value</td><td>1</td><td>2</td><td>17</td><td>18</td><td>19</td><td>3</td><td>4</td><td>5</td><td>0</td><td>1</td><td>20</td><td>21</td></tr></tbody></table>

Distribute the weights from **2 to 9**, from **right to left** (restarting after the eighth character), as shown below:

<table data-full-width="false"><thead><tr><th width="84">CNPJ</th><th width="55">1</th><th width="55">2</th><th width="57">A</th><th width="56">B</th><th width="56">C</th><th width="55">3</th><th width="56">4</th><th width="55">5</th><th width="56">0</th><th width="55">1</th><th width="56">D</th><th width="56">E</th></tr></thead><tbody><tr><td>Value</td><td>1</td><td>2</td><td>17</td><td>18</td><td>19</td><td>3</td><td>4</td><td>5</td><td>0</td><td>1</td><td>20</td><td>21</td></tr><tr><td>Weight</td><td>5</td><td>4</td><td>3</td><td>2</td><td>9</td><td>8</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td></tr></tbody></table>

Multiply the value by the weight for each column and sum all results:

<table data-full-width="false"><thead><tr><th width="84">CNPJ</th><th width="55">1</th><th width="55">2</th><th width="57">A</th><th width="56">B</th><th width="56">C</th><th width="55">3</th><th width="56">4</th><th width="55">5</th><th width="56">0</th><th width="55">1</th><th width="56">D</th><th width="56">E</th></tr></thead><tbody><tr><td>Value</td><td>1</td><td>2</td><td>17</td><td>18</td><td>19</td><td>3</td><td>4</td><td>5</td><td>0</td><td>1</td><td>20</td><td>21</td></tr><tr><td>Weight</td><td>5</td><td>4</td><td>3</td><td>2</td><td>9</td><td>8</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td></tr><tr><td>Product</td><td>5</td><td>8</td><td>51</td><td>36</td><td>171</td><td>24</td><td>28</td><td>30</td><td>0</td><td>4</td><td>60</td><td>42</td></tr></tbody></table>

`5 + 8 + 51 + 36 + 171 + 24 +28 + 30 + 0 + 4 + 60 + 42 = 459`

Obtain the remainder of the division of the sum by **11**.\
If the remainder is **0 or 1**, the first check digit is **0**.\
Otherwise, the first check digit is **11 − remainder**.

In this example:\
Remainder of `459/11 = 8`, so the first check digit is `3` (result of `11-8`)

#### Second Check Digit Calculation

To calculate the second check digit, append the **first check digit** to the end of the CNPJ, forming **13 characters**, and repeat the same steps used for the first digit.

<table data-full-width="false"><thead><tr><th width="84">CNPJ</th><th width="55">1</th><th width="55">2</th><th width="57">A</th><th width="56">B</th><th width="56">C</th><th width="55">3</th><th width="56">4</th><th width="55">5</th><th width="56">0</th><th width="55">1</th><th width="56">D</th><th width="56">E</th><th width="56">3</th></tr></thead><tbody><tr><td>Value</td><td>1</td><td>2</td><td>17</td><td>18</td><td>19</td><td>3</td><td>4</td><td>5</td><td>0</td><td>1</td><td>20</td><td>21</td><td>3</td></tr><tr><td>Weight</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>9</td><td>8</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td></tr><tr><td>Product</td><td>6</td><td>10</td><td>68</td><td>54</td><td>38</td><td>27</td><td>32</td><td>35</td><td>0</td><td>5</td><td>80</td><td>63</td><td>6</td></tr></tbody></table>

`6 + 10 + 68 + 54 + 38 + 27 + 32 + 35 + 0 + 5 + 80 + 63 + 6 = 424`

Remainder of `424/11 = 6`, so the second check digit is **5** (result of `11 − 6`).

Final result: `12.ABC.345/01DE-`<mark style="color:red;">`35`</mark>


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
