/dansk-cvr

Danish CVR Number Generator & Validator

Validate and generate valid Danish CVR company numbers (8 digits, MOD11) locally for testing.

Generate a valid test CVR number (MOD11).
-

How it works

A Danish CVR number identifies a company and is 8 digits, the last being a MOD11 check digit. The check uses the weights 2-7-6-5-4-3-2 over the first seven digits. The numbers here are valid test data only and belong to no real company.

About this tool

The CVR tool lets you validate a Danish CVR number (Centralt Virksomhedsregister) and generate valid test numbers. A CVR is 8 digits where the last is a MOD11 check digit based on the weights 2-7-6-5-4-3-2. Useful for developers building invoice systems, customer databases or integrations with Danish companies, and for QA teams needing realistic test data. Generated numbers are mathematically valid only and belong to no real company. All in-browser.

How to use it

  1. Paste or type a CVR number (8 digits).
  2. See at once if it is valid (MOD11 check).
  3. Click "Generate" to create a valid test number.
  4. Copy the result for development or testing.

Examples

Validation example
Input13585628
OutputValid CVR (MOD11 check passes)
Wrong check digit
Input13585627
OutputInvalid CVR (last digit wrong)
The check takes 1-3-5-8-5-6-2, multiplies by weights 2-7-6-5-4-3-2 and sums the products. The total mod 11 must give 0 together with the check digit. Changing one digit almost always makes the sum invalid, so MOD11 is a solid error guard.

Common use cases

  • Validating customer input in invoice and CRM systems.
  • Generating test data for QA and development.
  • Checking CVR numbers imported from CSV or Excel.
  • Regex-free validation in forms.
  • Verifying that OCR-read CVR numbers are actually correct.

Frequently asked questions

What does CVR stand for?
CVR stands for "Centralt Virksomhedsregister", Denmark’s official register of all registered businesses (public companies, ApS, associations, public entities, sole proprietors). Managed by Erhvervsstyrelsen (Business Authority). Each business gets a unique 8-digit CVR when registered. The register is public and searchable at cvr.dk, showing name, address, industry, management and financials.
Is CVR the same as SE or P number?
No. CVR identifies the business (legal entity). SE ("Skatteregistreret Enhed") is a tax-registration number, often identical to CVR for simple firms, but a company can have multiple SEs for different VAT registrations or branches. P (production-unit) identifies a single operating site; a firm with three shops has one CVR and three Ps. All are 8 digits and MOD11, but used in different contexts.
Can I use generated numbers for anything real?
No. Generated numbers are only mathematically valid; they carry a correct MOD11 check digit. They are not assigned to any real company in the CVR register, and using them in real settings (invoicing, contracts, VAT reporting) will be rejected by Danish authorities. Use them only for development, testing, tutorials, docs and unit tests. For real company checks, look them up on cvr.dk or use the Erhvervsstyrelsen API.
How do I verify a real CVR?
Use cvr.dk (Erhvervsstyrelsen’s free lookup) for manual checks; you can search by number or name and get company data, address, management, financials. For programmatic validation there’s the CVR API (open, no auth, free, JSON). Our tool only checks the MOD11 structure, not whether the company exists. Best practice is MOD11 (fast local check before network call) plus CVR API (existence verification).

Technical background

MOD11 algorithm: given digits d1..d8, sum S = 2·d1 + 7·d2 + 6·d3 + 5·d4 + 4·d5 + 3·d6 + 2·d7 + 1·d8. Valid if S mod 11 = 0. Generation: pick random d1..d7, compute S′ = 2·d1 + 7·d2 + 6·d3 + 5·d4 + 4·d5 + 3·d6 + 2·d7, then d8 = (11 - S′ mod 11) mod 11; if d8 = 10, discard and retry. MOD11 catches all single-digit errors and most two-digit permutations, far better than a simple sum-modulus. Source: Erhvervsstyrelsen spec. All in JavaScript in the browser; no calls to the CVR API or external sources. Accepts formatting with hyphens or spaces, only digits count.