Utility Coder
Back to Blog
generator

ACN Generator

Andy Pham
acn generator, acn generator, acn generator online

Ready to try ACN Generator?

Access the free online tool now - no registration required

Open Tool

ACN Generator - Complete Guide

ACN (Australian Company Number) generator creates valid test ACN numbers. ACN is a unique 9-digit identifier for Australian companies, using a weighted checksum algorithm. Essential for testing Australian business systems.

How It Works

Generate 8 random digits for company identifier, then calculate check digit using weighted modulus 10 algorithm. Weights: 8,7,6,5,4,3,2,1 for positions 1-8. Sum weighted digits, calculate (10 - (sum % 10)) % 10 for check digit.

Technical Details

ACN format: 9 digits (XXX XXX XXX), commonly displayed with spaces. Check digit: multiply digits 1-8 by weights 8-1, sum products, check digit = (10 - sum % 10) % 10. Valid ACN: check digit matches calculated value. ASIC maintains registry.

Common Use Cases

  1. Software Testing: Generate valid ACNs for test data.
  2. Form Validation: Test ACN input validation logic.
  3. Database Seeding: Populate test databases with valid ACNs.
  4. Integration Testing: Test ASIC API integrations.

Code Examples

ACN Generator and Validator

// ACN check digit weights
const ACN_WEIGHTS = [8, 7, 6, 5, 4, 3, 2, 1];

// Calculate ACN check digit
function calculateACNCheckDigit(digits) {
  if (digits.length !== 8) throw new Error('Need 8 digits');

  const sum = digits.reduce((acc, digit, i) => {
    return acc + (digit * ACN_WEIGHTS[i]);
  }, 0);

  const remainder = sum % 10;
  return remainder === 0 ? 0 : 10 - remainder;
}

// Validate ACN
function validateACN(acn) {
  const digits = String(acn).replace(/\s/g, '').split('').map(Number);

  if (digits.length !== 9 || digits.some(isNaN)) {
    return false;
  }

  const checkDigit = calculateACNCheckDigit(digits.slice(0, 8));
  return checkDigit === digits[8];
}

// Generate valid ACN
function generateACN() {
  // Generate 8 random digits
  const digits = Array(8).fill(0).map(() => Math.floor(Math.random() * 10));

  // Calculate and append check digit
  const checkDigit = calculateACNCheckDigit(digits);
  digits.push(checkDigit);

  return digits.join('');
}

// Format ACN with spaces
function formatACN(acn) {
  const clean = String(acn).replace(/\D/g, '');
  return clean.replace(/(\d{3})(\d{3})(\d{3})/, '$1 $2 $3');
}

// Generate multiple ACNs
function generateMultipleACNs(count) {
  return Array(count).fill(0).map(() => formatACN(generateACN()));
}

// Examples
console.log(validateACN('000 000 019')); // true (valid checksum)
console.log(generateACN());               // e.g., "123456782"
console.log(formatACN(generateACN()));    // e.g., "123 456 782"
console.log(generateMultipleACNs(5));     // 5 formatted ACNs

Complete ACN implementation with validation, generation, and formatting.

Tips & Best Practices

  • Always format ACNs with spaces for display
  • Validate both checksum and format (9 digits)
  • Use generated ACNs only for testing
  • Check against ASIC for real company verification
  • ACN can be embedded in ABN (positions 3-11)

Common Mistakes to Avoid

  • Using generated ACNs as real company numbers
  • Wrong weight sequence (must be 8,7,6,5,4,3,2,1)
  • Not handling edge case when remainder is 0
  • Confusing ACN with ABN validation
  • Forgetting to strip spaces before validation

When to Use This Tool

Use ACN generator for testing Australian business software, form validation, database seeding, or integration testing. Never use for actual business purposes.

Frequently Asked Questions

Can I use generated ACNs for real companies?

No. Generated ACNs are for testing only. Real ACNs are assigned by ASIC during company registration. Using fake ACNs is fraudulent.

How do I verify a real ACN?

Use the ASIC Business Register (ABR) or ABN Lookup. Generated ACNs pass checksum but aren't registered companies.

What's the difference between ACN and ABN?

ACN is 9-digit company number. ABN is 11-digit business number (includes GST registration). ABN often embeds ACN. Different check algorithms.

Are there reserved test ACNs?

Unlike credit cards, no official test ACNs exist. Generate valid checksums for testing, but don't use them as real company references.

Get Started

Ready to try ACN Generator? Use the tool now - it's free, fast, and works right in your browser.


Last updated: June 27, 2026

Start using ACN Generator

Free, fast, and privacy-focused - try it now

Launch Tool