Skip to main content

CUFE Validator (Colombia)

Validate 96-character hexadecimal structure (SHA-384) and DIAN catalog URLs for Colombian electronic invoices.

How does validation work?

CUFE is the fiscal integrity hash regulated by DIAN (Resolutions 42/2020 & 165/2023) mandatory for all electronic invoices in Colombia.

Calculated using cryptographic SHA-384 over 14 concatenated fiscal fields including Invoice Number, Date, Amounts, Taxes, NITs, Environment, and Technical Key.

Anatomy & Structure of CUFE Code (Colombia)

The Código Único de Factura Electrónica (CUFE) is a cryptographic SHA-384 hash of 96 hex characters computed from 11 tax invoice fields:

PositionFieldLengthTechnical Meaning in DIANExample
1 to 96SHA-384 Hash96 hex charsOne-way 384-bit cryptographic digest in lowercase hexadecimal (0-9, a-f).45f8a02b...
SourceInvoice Data11 fieldsInvoice number, date, time, total amount, taxes, issuer NIT, buyer ID, and software technical key.NumFac+FecFac+...

CUFE Cryptographic Algorithm (DIAN Resolution 000042)

The CUFE is generated via the Secure Hash Algorithm SHA-384:

CUFE = SHA-384(NumFac + FecFac + HorFac + ValFac + CodImp1 + ValImp1 + ... + TechKey + EnvType)
  1. 1. Field Concatenation: 11 specific billing fields are concatenated without spaces or separators per DIAN specs.
  2. 2. Technical Key Addition: the secret 64-character technical key issued by DIAN is appended to the string.
  3. 3. SHA-384 Cryptographic Hash: the concatenated string is passed through the SHA-384 hash function.
  4. 4. Hexadecimal String: the final output is represented as exactly 96 lowercase hexadecimal characters.

Frequently Asked Questions on Validation