{"id":15504,"date":"2026-07-27T09:00:00","date_gmt":"2026-07-27T09:00:00","guid":{"rendered":"https:\/\/codeaura.ai\/?p=15504"},"modified":"2026-07-21T01:44:52","modified_gmt":"2026-07-21T01:44:52","slug":"the-technical-anatomy-of-the-alphanumeric-cnpj-format-mask-regex-and-validation","status":"publish","type":"post","link":"https:\/\/codeaura.ai\/fr\/the-technical-anatomy-of-the-alphanumeric-cnpj-format-mask-regex-and-validation\/","title":{"rendered":"The Technical Anatomy of the Alphanumeric CNPJ: Format, Mask, Regex, and Validation"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"15504\" class=\"elementor elementor-15504\">\n\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-22169526 e-flex e-con-boxed e-con e-parent\" data-id=\"22169526\" data-element_type=\"container\" data-settings=\"{&quot;content_width&quot;:&quot;boxed&quot;}\" data-core-v316-plus=\"true\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-31c6bfb elementor-widget elementor-widget-text-editor\" data-id=\"31c6bfb\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.17.0 - 08-11-2023 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<h4>The key technical shift: CNPJ is still 14 positions, but no longer numeric-only<\/h4><div class=\"text-base my-auto mx-auto [--thread-content-margin:var(--thread-content-margin-xs,calc(var(--spacing)*4))] @w-sm\/main:[--thread-content-margin:var(--thread-content-margin-sm,calc(var(--spacing)*6))] @w-lg\/main:[--thread-content-margin:var(--thread-content-margin-lg,calc(var(--spacing)*16))] px-(--thread-content-margin)\"><div class=\"[--thread-content-max-width:40rem] @w-lg\/main:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\" data-conversation-screenshot-content=\"\"><div class=\"flex max-w-full flex-col gap-4 grow\"><div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal outline-none keyboard-focused:focus-ring [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"93319b8d-fc9e-4be3-83a1-6201b3584a7e\" data-message-model-slug=\"gpt-5-5-thinking\"><div class=\"flex w-full flex-col gap-1 empty:hidden\"><div class=\"markdown prose dark:prose-invert wrap-break-word w-full dark markdown-new-styling\"><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"96\" data-end=\"293\">The alphanumeric CNPJ does not require teams to think first about a longer field. It requires them to question a deeper assumption: <strong data-start=\"228\" data-end=\"293\">is the system treating CNPJ as a number, or as an identifier?<\/strong><\/p><p data-start=\"295\" data-end=\"705\">That distinction matters. Receita Federal\u2019s current guidance states that the alphanumeric CNPJ will be assigned from <strong data-start=\"412\" data-end=\"425\">July 2026<\/strong> to new registrations, while existing CNPJs remain valid. The new identifier keeps the same <strong data-start=\"517\" data-end=\"542\">14-position structure<\/strong>: the first twelve positions may contain letters and numbers, and the final two positions remain numeric verification digits.<\/p><p data-start=\"707\" data-end=\"813\">For developers, QA teams, architects, ERP owners, and integration teams, the practical takeaway is simple:<\/p><p data-start=\"815\" data-end=\"909\"><strong data-start=\"815\" data-end=\"909\">The CNPJ is still 14 positions, but it can no longer be treated as a purely numeric value.<\/strong><\/p><p data-start=\"911\" data-end=\"1387\">That means a field like <code data-start=\"935\" data-end=\"941\">cnpj<\/code>, <code data-start=\"943\" data-end=\"950\">taxId<\/code>, <code data-start=\"952\" data-end=\"970\">customerDocument<\/code>, <code data-start=\"972\" data-end=\"994\">supplierRegistration<\/code>, or <code data-start=\"999\" data-end=\"1018\">companyIdentifier<\/code> may look harmless in the UI but still fail somewhere deeper in the system. A frontend mask might accept the new format, while a backend regex rejects it. An API schema might still define the field as numeric. A database column might allow only digits. An ETL job might cast the value to an integer. A legacy batch routine might compare CNPJ values using numeric logic.<\/p><p data-start=\"1389\" data-end=\"1703\">This is why the alphanumeric CNPJ should be handled as a <strong data-start=\"1446\" data-end=\"1475\">validated text identifier<\/strong>. It has structure. It has formatting rules. It has check digits. It may need normalization before comparison or storage. But it is not a mathematical value, and systems should not store, parse, transport, or validate it as one.<\/p><p data-start=\"1705\" data-end=\"2014\">The modernization task, therefore, is not limited to changing a mask from <code data-start=\"1779\" data-end=\"1799\">00.000.000\/0000-00<\/code> to something more flexible. Teams need to trace every place where CNPJ appears and determine whether that component assumes \u201c14 digits\u201d or correctly supports \u201c12 alphanumeric positions plus 2 numeric check digits.\u201d<\/p><p data-start=\"2016\" data-end=\"2108\" data-is-last-node=\"\" data-is-only-node=\"\">That is the technical anatomy of the change: same overall length, different data assumption.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><h4>What stays the same<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"37\" data-end=\"352\">The alphanumeric CNPJ introduces an important technical change, but it does not replace the entire structure that teams already know. Several parts of the current model remain familiar, which means the work is less about redesigning every field from scratch and more about finding where systems are too restrictive.<\/p><p data-start=\"354\" data-end=\"667\">First, the CNPJ remains a <strong data-start=\"380\" data-end=\"406\">14-position identifier<\/strong>. Receita Federal states that the new format keeps 14 positions, with the first eight identifying the root, the following four identifying the establishment order, and the final two corresponding to the verification digits.<\/p><p data-start=\"669\" data-end=\"1032\">Second, <strong data-start=\"677\" data-end=\"716\">existing numeric CNPJs remain valid<\/strong>. The change applies to new registrations from July 2026 and does not require existing companies to receive a different CNPJ. This matters because systems must support both formats at the same time: today\u2019s numeric-only CNPJs and the new alphanumeric CNPJs issued after rollout.<\/p><p data-start=\"1034\" data-end=\"1329\">Third, the <strong data-start=\"1045\" data-end=\"1096\">final two positions remain numeric check digits<\/strong>. That means validation does not disappear. Teams will still need structural validation, check digit validation, and business-level validation where applicable. What changes is the character composition of the first twelve positions.<\/p><p data-start=\"1331\" data-end=\"1451\">Fourth, the <strong data-start=\"1343\" data-end=\"1393\">display mask remains structurally recognizable<\/strong>. The familiar visual pattern can still be represented as:<\/p><p data-start=\"1453\" data-end=\"1473\"><code data-start=\"1453\" data-end=\"1473\">XX.XXX.XXX\/XXXX-00<\/code><\/p><p data-start=\"1475\" data-end=\"1622\">The difference is that the <code data-start=\"1502\" data-end=\"1505\">X<\/code> positions can no longer be assumed to mean only digits. For implementation planning, teams should think in terms of:<\/p><p data-start=\"1624\" data-end=\"1676\"><code data-start=\"1624\" data-end=\"1676\">12 alphanumeric positions + 2 numeric check digits<\/code><\/p><p data-start=\"1678\" data-end=\"1970\">That continuity is useful. It means teams do not necessarily need longer database fields, longer API payloads, or entirely new user-interface layouts. But they do need to review whether the current 14-position implementation is flexible enough to accept letters in the first twelve positions.<\/p><p data-start=\"1972\" data-end=\"2277\" data-is-last-node=\"\" data-is-only-node=\"\">The practical point is this: <strong data-start=\"2001\" data-end=\"2077\">the shape of the CNPJ remains familiar, but the allowed content changes.<\/strong> Systems that already treat CNPJ as a string with explicit validation may need targeted updates. Systems that treat CNPJ as an integer, numeric-only field, or 14-digit pattern will need deeper review.<\/p><h4>What changes in the new format<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"48\" data-end=\"512\">The main change is in the first twelve positions of the CNPJ. Under the alphanumeric model, those positions may contain both letters and numbers, while the final two positions continue to be numeric verification digits. Receita Federal describes the new CNPJ as keeping <strong data-start=\"318\" data-end=\"334\">14 positions<\/strong>: the first eight positions identify the root, the next four identify the establishment order, and the last two remain numeric check digits.<\/p><p data-start=\"514\" data-end=\"567\">A simplified way to think about the new structure is:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>XX.XXX.XXX\/XXXX-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"601\" data-end=\"607\">Where:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Positions 1\u201312: alphanumeric\nPositions 13\u201314: numeric check digits<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"689\" data-end=\"761\">For implementation discussions, teams may use a generic example such as:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>AA.AAA.AAA\/AAAA-DV<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"795\" data-end=\"990\">That example is useful because it makes the visual difference clear: the familiar punctuation pattern can remain, but the content of the first twelve positions can no longer be limited to digits.<\/p><p data-start=\"992\" data-end=\"1428\">This is where many existing implementations will break. A legacy validation rule that expects only <code data-start=\"1091\" data-end=\"1096\">0\u20139<\/code> across all 14 characters may reject a valid future CNPJ. A database constraint such as <code data-start=\"1184\" data-end=\"1212\">CHECK cnpj ~ '^[0-9]{14}$'<\/code> will fail. A JavaScript input mask that only accepts numeric keystrokes will block entry. A JSON schema using <code data-start=\"1323\" data-end=\"1341\">\"type\": \"number\"<\/code> or a numeric-only pattern will reject the payload before the business logic even runs.<\/p><p data-start=\"1430\" data-end=\"1893\">Teams should also be careful not to publish hardcoded assumptions about the exact allowed character set until they have checked Receita Federal\u2019s official technical documentation. For example, an implementation may need to decide whether to normalize lowercase input, reject accented characters, block symbols, or restrict the value to uppercase Latin letters and digits. Those choices should be aligned with the official specification, not guessed from examples.<\/p><p data-start=\"1895\" data-end=\"1930\">The safe implementation mindset is:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Do not validate \u201c14 digits.\u201d\nValidate \u201c12 allowed alphanumeric characters followed by 2 numeric check digits.\u201d<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2056\" data-end=\"2232\" data-is-last-node=\"\" data-is-only-node=\"\">That change may sound small, but it affects every layer where the CNPJ is entered, stored, formatted, validated, searched, exported, imported, or exchanged with another system.<\/p><h4>Why CNPJ should be treated as a string, not a number<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"69\" data-end=\"147\">The most important implementation principle for the alphanumeric CNPJ is this:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Treat CNPJ as a business identifier, not a mathematical number.<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"226\" data-end=\"627\">A CNPJ may contain digits, punctuation in its displayed form, and now letters in its first twelve positions. But none of that makes it a numeric value. It is an identifier with a defined structure and validation rules. Systems do not add, subtract, multiply, average, or calculate totals from CNPJ values. They store them, compare them, validate them, search for them, exchange them, and display them.<\/p><p data-start=\"629\" data-end=\"690\">When systems treat CNPJ as a number, several problems appear.<\/p><p data-start=\"692\" data-end=\"1120\">A numeric field cannot store letters. That alone makes numeric data types incompatible with the new format. But even before the alphanumeric change, numeric treatment was risky because leading zeros can be lost. A value that should be preserved as a 14-character identifier may be shortened or transformed if it is stored as an integer, exported to a spreadsheet, passed through an ETL job, or inferred as a number by a BI tool.<\/p><p data-start=\"1122\" data-end=\"1463\">Formatting can also be corrupted. A system that stores only a number may later try to reconstruct the mask as <code data-start=\"1232\" data-end=\"1252\">00.000.000\/0000-00<\/code>, but that logic depends on a stable 14-digit string. Once letters are introduced, formatting functions that assume numeric-only input may fail, truncate characters, or reject the value before formatting begins.<\/p><p data-start=\"1465\" data-end=\"1922\">APIs are another common failure point. A frontend may correctly send a CNPJ as a string, but the receiving service may define the field as numeric in an OpenAPI specification, JSON schema, DTO, serializer, or validation middleware. In that case, the request can fail before it reaches the application logic. The same issue can appear in message queues, ERP connectors, supplier onboarding workflows, fiscal integrations, and third-party validation services.<\/p><p data-start=\"1924\" data-end=\"2307\">Legacy systems are especially exposed because numeric assumptions are often buried in routines that no longer have clear ownership. A COBOL copybook, stored procedure, fixed-width layout, Java validation class, batch import script, or mainframe job may define CNPJ as numeric because the old format allowed that shortcut. With the alphanumeric format, those shortcuts become defects.<\/p><p data-start=\"2309\" data-end=\"2386\">The safer rule is to store and process CNPJ as text with explicit validation:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Database type: text, varchar, char, or equivalent\nApplication type: string\nAPI type: string\nValidation: explicit structural and check digit rules\nFormatting: separate from validation\nComparison: normalized string comparison<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2625\" data-end=\"2901\">This does not mean accepting any arbitrary text. It means separating the data type from the validation rules. The type should preserve the identifier exactly. Validation should decide whether the identifier has the right structure, allowed characters, and verification digits.<\/p><p data-start=\"2903\" data-end=\"3044\" data-is-last-node=\"\" data-is-only-node=\"\">That distinction is what makes systems ready for both formats: existing numeric-only CNPJs and new alphanumeric CNPJs issued after July 2026.<\/p><h4>Input masks and formatting<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"43\" data-end=\"202\">Input masks are usually the first visible place where the alphanumeric CNPJ change appears. Many current forms are built around a numeric-only pattern such as:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>00.000.000\/0000-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"248\" data-end=\"438\">That mask assumes every meaningful character is a digit. Under the new format, the visual structure can remain familiar, but the first twelve positions need to allow alphanumeric characters:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>XX.XXX.XXX\/XXXX-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"484\" data-end=\"503\">In practical terms:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Positions 1\u201312: letters and numbers\nPositions 13\u201314: numbers only<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"596\" data-end=\"888\">This has implications for web forms, mobile apps, ERP screens, back-office portals, supplier onboarding flows, customer registration pages, fiscal modules, and internal admin tools. Any component that blocks non-numeric keystrokes in the first twelve positions will reject valid future CNPJs.<\/p><p data-start=\"890\" data-end=\"1021\">But teams should avoid treating the mask update as the whole project. <strong data-start=\"960\" data-end=\"1021\">Formatting and validation are different responsibilities.<\/strong><\/p><p data-start=\"1023\" data-end=\"1077\">Formatting controls how the value appears to the user:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>XX.XXX.XXX\/XXXX-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1123\" data-end=\"1177\">Validation determines whether the value is acceptable:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Does it have the expected number of characters?\nAre the first twelve positions allowed alphanumeric characters?\nAre the final two positions numeric?\nDo the check digits match the official validation rule?\nIs the CNPJ accepted by the relevant business workflow?<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1465\" data-end=\"1743\">A common implementation mistake is to update the frontend mask while leaving backend validation unchanged. In that scenario, a user may successfully type an alphanumeric CNPJ into the interface, only for the API, database, integration layer, or ERP connector to reject it later.<\/p><p data-start=\"1745\" data-end=\"2086\">Another common issue is inconsistent normalization. For example, one layer may convert letters to uppercase, another may preserve lowercase, and a third may treat lowercase input as invalid. Teams should define and test a consistent normalization rule based on Receita Federal\u2019s official technical documentation before production deployment.<\/p><p data-start=\"2088\" data-end=\"2190\">It is also important to distinguish formatted and unformatted values. A user-facing field may display:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>AB.123.CD4\/EF56-78<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2236\" data-end=\"2321\">But a database, API, or message payload may store or transmit the normalized version:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>AB123CD4EF5678<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2363\" data-end=\"2613\">Both forms can be valid in different contexts, but systems need to be clear about which one is expected. Otherwise, formatting characters such as <code data-start=\"2509\" data-end=\"2512\">.<\/code>, <code data-start=\"2514\" data-end=\"2517\">\/<\/code>, and <code data-start=\"2523\" data-end=\"2526\">-<\/code> may cause import failures, search mismatches, duplicate records, or validation errors.<\/p><p data-start=\"2615\" data-end=\"2661\">The safest design is to separate the concerns:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Input handling accepts the expected user format.\nNormalization removes punctuation and applies consistent casing.\nStructural validation checks the character pattern.\nCheck digit validation confirms mathematical validity.\nStorage preserves the normalized identifier as text.\nDisplay formatting is applied only when presenting the value.<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"3024\" data-end=\"3206\" data-is-last-node=\"\" data-is-only-node=\"\">That separation makes the system easier to test, easier to integrate, and less likely to break when the CNPJ appears in APIs, batch files, CSV exports, databases, or legacy routines.<\/p><h4>Regex considerations<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"37\" data-end=\"213\">Regex rules are often where numeric-only CNPJ assumptions are most visible. Many existing systems validate CNPJ shape by checking for exactly 14 digits in the normalized value:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>^[0-9]{14}$<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"241\" data-end=\"410\">That pattern may work for today\u2019s numeric-only CNPJs, but it will reject future alphanumeric CNPJs because the first twelve positions can no longer be limited to digits.<\/p><p data-start=\"412\" data-end=\"513\">For the new format, teams should think in two layers: <strong data-start=\"466\" data-end=\"487\">normalized values<\/strong> and <strong data-start=\"492\" data-end=\"512\">formatted values<\/strong>.<\/p><p data-start=\"515\" data-end=\"651\">A normalized CNPJ removes punctuation and keeps only the meaningful identifier characters. In that form, the expected structure becomes:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>12 alphanumeric characters followed by 2 numeric digits<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"722\" data-end=\"765\">A generic structural pattern may look like:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>^[A-Z0-9]{12}[0-9]{2}$<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"804\" data-end=\"920\">A formatted CNPJ keeps punctuation for display or user input. In that form, the structure follows the familiar mask:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>XX.XXX.XXX\/XXXX-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"954\" data-end=\"996\">A generic formatted pattern may look like:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>^[A-Z0-9]{2}\\.[A-Z0-9]{3}\\.[A-Z0-9]{3}\/[A-Z0-9]{4}-[0-9]{2}$<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1073\" data-end=\"1353\">These examples are useful for planning, but production rules should be aligned with Receita Federal\u2019s official technical specification. Teams should confirm the final allowed character set, casing expectations, and normalization behavior before implementing production validation.<\/p><p data-start=\"1355\" data-end=\"1476\">It is also important not to rely on a single regex everywhere. Different parts of the system may need different handling:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Stored value without punctuation\nUser-facing value with punctuation\nAPI payload value\nCSV import value\nFixed-width file value\nSearch input value\nLegacy integration value<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1661\" data-end=\"1716\">For example, a UI may accept a formatted value such as:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>AB.123.CD4\/EF56-78<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1750\" data-end=\"1794\">But an API may require the normalized value:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>AB123CD4EF5678<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1824\" data-end=\"2133\">A search field may need to accept either form, normalize the input, and compare it against the stored identifier. A batch import may need to reject punctuation if the file layout expects fixed positions. A data warehouse may need to preserve the value as text while applying separate validation status fields.<\/p><p data-start=\"2135\" data-end=\"2411\">Case handling is another practical issue. If users enter lowercase letters, the system should behave consistently. A common approach is to normalize input to uppercase before validation and storage, but the exact rule should be defined explicitly and tested across all layers.<\/p><p data-start=\"2413\" data-end=\"2782\">The main point is that regex should confirm the <strong data-start=\"2461\" data-end=\"2470\">shape<\/strong> of the CNPJ, not carry the entire validation burden. Regex can tell whether the value follows an expected character pattern. It cannot prove that the check digits are valid, that the CNPJ exists, that the company is active, or that the identifier is accepted by a particular fiscal, ERP, or onboarding workflow.<\/p><p data-start=\"2784\" data-end=\"2810\">A safer regex strategy is:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Normalize first.\nValidate structure second.\nValidate check digits third.\nApply business validation last.<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2930\" data-end=\"3030\" data-is-last-node=\"\" data-is-only-node=\"\">This separation prevents teams from confusing \u201clooks like a CNPJ\u201d with \u201cis a valid and usable CNPJ.\u201d<\/p><h4>Validation is more than regex<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"46\" data-end=\"105\">Regex is useful, but it is not the same as CNPJ validation.<\/p><p data-start=\"107\" data-end=\"562\">A regex can confirm whether a value has the expected shape. For the alphanumeric CNPJ, that might mean checking whether the normalized value contains twelve allowed alphanumeric characters followed by two numeric check digits. Receita Federal\u2019s public guidance confirms that the new CNPJ keeps 14 positions, with the first twelve positions becoming alphanumeric and the last two remaining numeric verification digits.<\/p><p data-start=\"564\" data-end=\"616\">But structural validation only answers one question:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Does this value look like a CNPJ?<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"677\" data-end=\"696\">It does not answer:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Are the check digits correct?\nDoes this CNPJ exist?\nIs the company active?\nIs this CNPJ accepted in this workflow?\nIs this value valid for this fiscal document, ERP process, or onboarding rule?<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"917\" data-end=\"973\">Teams should separate CNPJ validation into three layers.<\/p><p data-start=\"975\" data-end=\"1185\">The first layer is <strong data-start=\"994\" data-end=\"1019\">structural validation<\/strong>. This checks the basic format: length, allowed characters, punctuation handling, and whether the final two positions are numeric. This is where regex is most useful.<\/p><p data-start=\"1187\" data-end=\"1632\">The second layer is <strong data-start=\"1207\" data-end=\"1233\">check digit validation<\/strong>. This confirms whether the verification digits are mathematically valid according to the official rule. Receita Federal already provides a public simulator that can generate and validate alphanumeric CNPJ inscriptions according to formation and check digit rules, which reinforces that check digit validation remains a separate concern from display formatting.<\/p><p data-start=\"1634\" data-end=\"2058\">The third layer is <strong data-start=\"1653\" data-end=\"1676\">business validation<\/strong>. A CNPJ may have the right structure and valid check digits but still fail a business process. For example, a supplier onboarding flow may need to confirm registration status. A fiscal integration may need to verify whether the identifier is accepted by a specific document layout. An ERP workflow may apply additional rules for branches, customers, vendors, payers, or recipients.<\/p><p data-start=\"2060\" data-end=\"2170\">This distinction matters because many systems collapse all validation into one function called something like:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>isValidCnpj()\nvalidateTaxId()\ncheckDocumentNumber()<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2249\" data-end=\"2580\">That function may actually be doing several different things at once: stripping punctuation, checking length, enforcing numeric-only characters, calculating check digits, calling an external service, and applying business rules. When the alphanumeric format arrives, this kind of bundled validation becomes harder to update safely.<\/p><p data-start=\"2582\" data-end=\"2640\">A better design is to make each validation layer explicit:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>normalizeCnpj(value)\nvalidateCnpjStructure(value)\nvalidateCnpjCheckDigits(value)\nvalidateCnpjBusinessStatus(value)\nformatCnpjForDisplay(value)<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2810\" data-end=\"3125\">This makes the system easier to test and easier to change. QA teams can test structural failures separately from check digit failures. API teams can return clearer error messages. Integration teams can identify whether a rejection came from schema validation, mathematical validation, or a downstream business rule.<\/p><p data-start=\"3127\" data-end=\"3298\" data-is-last-node=\"\" data-is-only-node=\"\">The main point is simple: <strong data-start=\"3153\" data-end=\"3298\" data-is-last-node=\"\">regex can tell whether a CNPJ has the right shape, but it cannot prove that the identifier is valid, active, or usable in a business process.<\/strong><\/p><h4>API and integration impact<\/h4><div class=\"text-base my-auto mx-auto [--thread-content-margin:var(--thread-content-margin-xs,calc(var(--spacing)*4))] @w-sm\/main:[--thread-content-margin:var(--thread-content-margin-sm,calc(var(--spacing)*6))] @w-lg\/main:[--thread-content-margin:var(--thread-content-margin-lg,calc(var(--spacing)*16))] px-(--thread-content-margin)\"><div class=\"[--thread-content-max-width:40rem] @w-lg\/main:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\" data-conversation-screenshot-content=\"\"><div class=\"flex max-w-full flex-col gap-4 grow\"><div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal outline-none keyboard-focused:focus-ring [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"2bea1952-a7fb-40a2-aa1b-c1e31e8a3a74\" data-message-model-slug=\"gpt-5-5-thinking\"><div class=\"flex w-full flex-col gap-1 empty:hidden\"><div class=\"markdown prose dark:prose-invert wrap-break-word w-full dark markdown-new-styling\"><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"43\" data-end=\"368\">The alphanumeric CNPJ change can still break a system even after the user interface has been updated. In many environments, the frontend is only the first layer. The value still has to move through APIs, schemas, services, databases, message queues, ERP connectors, fiscal integrations, batch jobs, and third-party platforms.<\/p><p data-start=\"370\" data-end=\"446\">That is why teams should review every contract that defines CNPJ as a field.<\/p><p data-start=\"448\" data-end=\"479\">Common places to check include:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>OpenAPI \/ Swagger schemas\nJSON Schema validation rules\nDTOs and request models\nGraphQL schemas\ndatabase contracts\nmessage queue payloads\nERP connectors\nfiscal document integrations\nsupplier and customer onboarding APIs\nthird-party validation services\nbatch file layouts\nfixed-width files\nCSV imports and exports<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"818\" data-end=\"885\">A common API issue is a schema that still defines CNPJ as a number:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>{\n  \"cnpj\": {\n    \"type\": <span class=\"\u037cz\">\"number\"<\/span>\n  }\n}<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"953\" data-end=\"1150\">That definition is unsafe for both existing and future formats. It can lose leading zeros, reject letters, and create inconsistent behavior across clients. A safer contract treats CNPJ as a string:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>{\n  \"cnpj\": {\n    \"type\": <span class=\"\u037cz\">\"string\"<\/span>\n  }\n}<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1218\" data-end=\"1482\">The same problem can appear in generated clients, typed SDKs, API gateways, validation middleware, and low-code integration tools. Even if the source service accepts alphanumeric values, a downstream consumer may still reject them because its contract is outdated.<\/p><p data-start=\"1484\" data-end=\"1814\">Integration formats deserve special attention. Fixed-width files, CNAB-like layouts, ERP import templates, fiscal files, and older batch processes often define fields by position and type. A field may be 14 characters long, which sounds compatible, but still be marked as numeric. That type assumption is what creates the failure.<\/p><p data-start=\"1816\" data-end=\"2160\">Search and matching logic also need review. Supplier, customer, branch, and billing systems may normalize CNPJ by stripping punctuation and comparing values. That approach can still work, but only if the normalization logic preserves letters and applies consistent casing. Any function that removes \u201cnon-digits\u201d will destroy the new identifier.<\/p><p data-start=\"2162\" data-end=\"2498\">The safest readiness approach is end-to-end testing. A team should not stop after confirming that one form accepts an alphanumeric CNPJ. They should confirm that the value can be created, validated, stored, retrieved, searched, exported, imported, transmitted to downstream systems, and accepted by the relevant fiscal or ERP workflows.<\/p><p data-start=\"2500\" data-end=\"2530\">The real question is not only:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Can the application accept the new CNPJ format?<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2605\" data-end=\"2611\">It is:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Can the entire system landscape preserve, validate, exchange, and use the new CNPJ format without silently corrupting it or rejecting it downstream?<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><h4 class=\"z-0 flex min-h-[46px] justify-start\">Database and data pipeline impact<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"50\" data-end=\"394\">Database fields and data pipelines are often where CNPJ assumptions become harder to see. A form may accept an alphanumeric CNPJ. An API may pass it correctly. But the value can still fail when it reaches a column constraint, stored procedure, ETL job, warehouse model, export routine, or reporting layer that assumes CNPJ contains only digits.<\/p><p data-start=\"396\" data-end=\"654\">The first area to review is the database type. Any CNPJ stored as an integer, numeric, decimal, or similar number type should be treated as a risk. The alphanumeric format requires letters in the first twelve positions, so the field should be stored as text:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Recommended database approach:\nCNPJ column type: CHAR, VARCHAR, TEXT, or equivalent\nStored value: normalized string\nValidation: explicit application or database rule<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"835\" data-end=\"1041\">Teams should also review column constraints. A column may already be defined as text but still reject alphanumeric values because of a numeric-only constraint, trigger, stored procedure, or validation rule:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"relative h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"pointer-events-none absolute inset-x-4 top-12 bottom-4\"><div class=\"pointer-events-none sticky z-40 shrink-0 z-1!\"><div class=\"sticky bg-token-border-light\">\u00a0<\/div><\/div><\/div><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"\"><div class=\"relative\"><div class=\"\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code><span class=\"\u037ct\">-- Numeric-only assumption that will reject alphanumeric CNPJs<\/span>\n<span class=\"\u037cv\">CHECK<\/span> (cnpj <span class=\"\u037cv\">~<\/span> <span class=\"\u037cz\">'^[0-9]{14}$'<\/span>)<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1147\" data-end=\"1317\">That rule may need to evolve toward a structure that supports twelve alphanumeric positions followed by two numeric check digits, aligned with the official specification.<\/p><p data-start=\"1319\" data-end=\"1595\">Indexes and search logic also need attention. Many applications normalize CNPJ by removing punctuation before storing or searching. That approach can still work, but only if the normalization logic preserves letters. Any function that keeps only digits will corrupt the value:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Unsafe normalization:\nRemove everything except 0\u20139\n\nSafer normalization:\nRemove punctuation, preserve allowed letters and numbers, apply consistent casing<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1765\" data-end=\"2108\">Data pipelines create another layer of exposure. ETL jobs may cast CNPJ to a number during ingestion, transformation, deduplication, or export. Data warehouse models may infer CNPJ as numeric because historical values were digit-only. BI tools and spreadsheets may automatically convert identifiers, remove leading zeros, or change formatting.<\/p><p data-start=\"2110\" data-end=\"2141\">Common places to check include:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>ETL transformations\ndata lake ingestion jobs\nwarehouse schemas\nBI semantic models\nCSV exports\nExcel reports\ndeduplication logic\ncustomer and supplier matching routines\nstored procedures\naudit reports\nfiscal reporting tables<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2380\" data-end=\"2730\">This matters because CNPJ often acts as a join key across systems. If one system stores the normalized alphanumeric value correctly and another strips letters or casts the field to a number, matching logic can fail silently. That can create duplicate records, broken supplier links, rejected fiscal records, reporting gaps, or failed reconciliations.<\/p><p data-start=\"2732\" data-end=\"2777\">The recommended principle is straightforward:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Store and process CNPJ as a text identifier with explicit validation rules.<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"2868\" data-end=\"3061\">That principle should apply beyond the transactional database. It should extend to warehouses, integration layers, reporting tools, exports, imports, test fixtures, and archived data processes.<\/p><p data-start=\"3063\" data-end=\"3355\">For modernization teams, this is also a discovery problem. The affected logic may not live in one obvious validation function. It may be spread across SQL scripts, stored procedures, COBOL copybooks, Java services, Python ETL jobs, ERP customizations, fiscal modules, and reporting templates.<\/p><p data-start=\"3357\" data-end=\"3595\" data-is-last-node=\"\" data-is-only-node=\"\">The database question is not only whether the field is long enough. The more important question is whether every layer that stores, transforms, indexes, joins, searches, exports, or reports on CNPJ preserves it as a valid text identifier.<\/p><h4 data-start=\"3357\" data-end=\"3595\">Testing implications<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"38\" data-end=\"268\">The alphanumeric CNPJ change needs test coverage beyond the form where the value is entered. A system may pass a UI test and still fail in an API, database write, ERP connector, fiscal integration, CSV import, or legacy batch job.<\/p><p data-start=\"270\" data-end=\"348\">Testing should start with the two formats that will coexist after the rollout:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Existing numeric CNPJ:\n00.000.000\/0000-00\n\nNew alphanumeric CNPJ:\nXX.XXX.XXX\/XXXX-00<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"448\" data-end=\"705\">That coexistence is important. Existing numeric CNPJs remain valid, so teams should not replace numeric validation with alphanumeric-only assumptions. The goal is to support both valid numeric-only CNPJs and valid alphanumeric CNPJs under the updated rules.<\/p><p data-start=\"707\" data-end=\"783\">QA teams should create test cases for both formatted and unformatted values:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Formatted:\nAB.123.CD4\/EF56-78\n\nUnformatted:\nAB123CD4EF5678<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"857\" data-end=\"1181\">Both forms may appear in different parts of the system. A user interface may accept the formatted value, while an API, database, or message queue may require the normalized version. Tests should confirm that normalization removes punctuation without removing letters, preserves the identifier, and applies consistent casing.<\/p><p data-start=\"1183\" data-end=\"1487\">Invalid cases are just as important. Teams should test values with unsupported symbols, missing characters, extra characters, letters in the check digit positions, lowercase input if normalization is expected, invalid check digits, and values that pass structural validation but fail business validation.<\/p><p data-start=\"1489\" data-end=\"1525\">A practical test set should include:<\/p><div class=\"relative w-full mt-4 mb-1\"><div class=\"\"><div class=\"contents\"><div class=\"relative\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"h-full min-h-0 min-w-0\"><div class=\"border border-token-border-light border-radius-3xl corner-superellipse\/1.1 rounded-3xl\"><div class=\"h-full w-full border-radius-3xl bg-(--code-block-surface) corner-superellipse\/1.1 overflow-clip rounded-3xl [--code-block-surface:var(--bg-elevated-secondary)] dark:[--code-block-surface:var(--composer-surface-primary)] lxnfua_clipPathFallback\"><div class=\"relative\"><div class=\"pe-11 pt-3\"><div class=\"relative z-0 flex max-w-full\"><div id=\"code-block-viewer\" class=\"q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch \u037cs \u037c16\" dir=\"ltr\"><div class=\"cm-scroller\"><pre class=\"cm-content q9tKkq_readonly m-0\"><code>Existing numeric CNPJs\nNew alphanumeric CNPJs\nFormatted values\nUnformatted values\nLowercase input normalization\nInvalid characters\nInvalid length\nLetters in the final two positions\nInvalid check digits\nDuplicate detection\nSearch by formatted and unformatted value\nAPI request and response payloads\nCSV imports and exports\nDatabase inserts and updates\nERP and fiscal integrations\nLegacy batch jobs<\/code><\/pre><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"\"><div class=\"\">\u00a0<\/div><\/div><\/div><\/div><\/div><\/div><p data-start=\"1937\" data-end=\"2344\">Teams should also test negative paths clearly. Error messages should distinguish between structural errors, check digit errors, and business-rule rejections. A message like \u201cinvalid CNPJ\u201d may be technically accurate, but it may not help a developer, QA analyst, or integration partner understand whether the failure came from the mask, schema, validation algorithm, downstream service, or business workflow.<\/p><p data-start=\"2346\" data-end=\"2665\">Regression testing is essential because the change affects existing behavior. Numeric CNPJs that work today must continue to work after the update. Search, matching, deduplication, reporting, and reconciliation logic should continue to recognize existing numeric identifiers while also preserving new alphanumeric ones.<\/p><p data-start=\"2667\" data-end=\"3032\" data-is-last-node=\"\" data-is-only-node=\"\">The safest test strategy is end-to-end. A valid alphanumeric CNPJ should be entered, normalized, structurally validated, check-digit validated, stored, retrieved, searched, exported, imported, sent through integrations, and accepted by downstream workflows. Anything less risks proving that one component is ready while the broader system landscape remains exposed.<\/p><h4 data-start=\"2667\" data-end=\"3032\">How CodeAura helps<\/h4><p class=\"PDq2pG_selectionAnchorContainer\" data-start=\"36\" data-end=\"256\">For many organizations, the hardest part of preparing for the alphanumeric CNPJ will not be writing a new regex or updating a single validation function. The harder problem is finding every place where CNPJ logic exists.<\/p><p data-start=\"258\" data-end=\"660\">In a modern enterprise environment, CNPJ may appear across frontend forms, backend services, ERP customizations, fiscal modules, database schemas, stored procedures, ETL jobs, reporting pipelines, API contracts, integration middleware, CSV templates, fixed-width files, and legacy routines. In older systems, those assumptions may be undocumented or buried inside code that few people still understand.<\/p><p data-start=\"662\" data-end=\"697\">This is where CodeAura is relevant.<\/p><p data-start=\"699\" data-end=\"1068\"><strong data-start=\"699\" data-end=\"721\">CodeAura Discovery<\/strong> helps teams identify where CNPJ appears across the software estate. That includes code references, validation functions, formatting utilities, database fields, schemas, API definitions, integration logic, scripts, jobs, and configuration files. For organizations that do not already have a reliable map of CNPJ usage, discovery is the first step.<\/p><p data-start=\"1070\" data-end=\"1522\"><strong data-start=\"1070\" data-end=\"1091\">CodeAura Analysis<\/strong> helps teams understand which components are affected by the new format. That may include numeric-only regex patterns, input masks, hardcoded validation rules, numeric data types, API schemas, database constraints, ETL casts, search logic, test fixtures, and third-party integration points. The goal is to move from a general concern \u2014 \u201cwe need to support alphanumeric CNPJ\u201d \u2014 to a specific technical inventory of what must change.<\/p><p data-start=\"1524\" data-end=\"1912\"><strong data-start=\"1524\" data-end=\"1549\">CodeAura Code Changes<\/strong> supports the implementation work that follows. Teams can use the analysis output to update validation routines, input handling, formatting functions, schema definitions, database rules, tests, and affected code paths. This is especially important in complex or regulated environments where changes must be traceable, reviewed, and tested across multiple systems.<\/p><p data-start=\"1914\" data-end=\"2382\">CodeAura is designed for this kind of modernization readiness work because it helps enterprises document, understand, analyze, and modernize complex software systems rather than making changes blindly. Its broader approach is based on creating system understanding before transformation, especially in legacy and regulated environments where business logic, dependencies, and validation rules may be hidden inside older codebases.<\/p><p data-start=\"2384\" data-end=\"2575\">The alphanumeric CNPJ is a good example of why that matters. The visible change is small: the identifier remains 14 positions. But the technical assumption changes everywhere CNPJ is handled.<\/p><p data-start=\"2577\" data-end=\"2782\" data-is-last-node=\"\" data-is-only-node=\"\"><a href=\"https:\/\/calendly.com\/suyash-codeaura\/30min\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"2577\" data-end=\"2782\" data-is-last-node=\"\">Need to know which validations, masks, fields, APIs, and code paths are affected by the alphanumeric CNPJ? CodeAura can perform a CNPJ Impact Analysis to identify the changes required before July 2026.<\/strong><\/a><\/p><\/div><\/div>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Technical guide to the alphanumeric CNPJ format, covering masks, regex, validation, APIs, databases, and testing.<\/p>","protected":false},"author":1,"featured_media":15512,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":"","footnotes":""},"categories":[61],"tags":[60],"class_list":["post-15504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","tag-general","entry"],"rttpg_featured_image_url":{"full":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"landscape":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"portraits":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"thumbnail":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-150x150.jpg",150,150,true],"medium":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-300x165.jpg",300,165,true],"large":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-1024x561.jpg",1024,561,true],"1536x1536":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"2048x2048":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"trp-custom-language-flag":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-18x10.jpg",18,10,true],"post-thumbnail":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation.jpg",1200,658,false],"martex-360x234-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-360x234.jpg",360,234,true],"martex-390x300-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-390x300.jpg",390,300,true],"martex-400x400-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-400x400.jpg",400,400,true],"martex-450x350-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-450x350.jpg",450,350,true],"martex-750x320-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-750x320.jpg",750,320,true],"martex-700x500-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-700x500.jpg",700,500,true],"martex-1000x600-cropped":["https:\/\/codeaura.ai\/wp-content\/uploads\/2026\/07\/The-Technical-Anatomy-of-the-Alphanumeric-CNPJ-Format-Mask-Regex-and-Validation-1000x600.jpg",1000,600,true]},"rttpg_author":{"display_name":"Suyash Sumaroo","author_link":"https:\/\/codeaura.ai\/fr\/author\/suyashcodevigor-com\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/codeaura.ai\/fr\/category\/general\/\" rel=\"category tag\">General<\/a>","rttpg_excerpt":"Technical guide to the alphanumeric CNPJ format, covering masks, regex, validation, APIs, databases, and testing.","_links":{"self":[{"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/posts\/15504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/comments?post=15504"}],"version-history":[{"count":7,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/posts\/15504\/revisions"}],"predecessor-version":[{"id":15511,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/posts\/15504\/revisions\/15511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/media\/15512"}],"wp:attachment":[{"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/media?parent=15504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/categories?post=15504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeaura.ai\/fr\/wp-json\/wp\/v2\/tags?post=15504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}