Attendoformerly Petpooja Payroll
Workforce & HR Management

How to Set a Fixed Employee Code for Every Worker

Most employee codes break for the same reason: somebody asked them to describe a person as well as identify one. Here is a format that survives a transfer.

By Avani Joshi

· 12 min read

Listen to this article

0:000:00
Employee code system showing HR assigning unique IDs to workers for attendance and payroll management.

An employee code is the short number your business gives each person on the payroll, and gives to nobody else. It is how one Rakesh Sharma is told apart from the other one.

It sounds like paperwork until the first time it goes wrong. Then it is a settlement paid to the wrong bank account, or a year of one person’s attendance sitting under somebody else’s name.

A working code is a fixed number. One person holds it, they hold it for their whole service, and every system you run reads it the same way. Most of the trouble in this article comes from one of those three slipping.

This page covers what an employee code is for, what the law does and does not ask of it, and how to set a fixed number you will not have to undo.

Key Takeaways

  • A fixed number, not a description: one per person, held for their whole service, identical in every record.
  • The law does not name it: what the codes require is registers, wage slips and an appointment letter, and a code is how you keep them tied to one person.
  • Never reuse a leaver’s code: the new joiner inherits the old one’s history.
  • Keep meaning out of it: a number that describes a branch or a grade cannot stay fixed when those move.
  • One code, every system: the register, the payslip, the device, the bank file and the final settlement all have to agree.
  • Numbers are not the same as identity: a provident fund number and your own code do different jobs.

What Does an Employee Code Actually Do?

Three things, and only three. It belongs to exactly one person, it does not move while their records exist, and every report shows the same number.

That is as true for a hotel with sixty staff as for a textile mill with six hundred.

Anything else you ask it to do works against the first three. A number that also tells you the branch is useful right up to the morning somebody transfers, and then it is wrong and stuck.

A supermarket chain in Jaipur found this out the ordinary way. Codes built as branch plus serial number looked tidy for two years, until staff started moving between outlets and every transferred person needed either a new code or a code that now lied.

In Simple Words
An employee code is a short number that stands for one person. It must be theirs alone, and it stays fixed for as long as you keep their records.

Attendo (formerly Petpooja Payroll) is a complete workforce management system for every kind of business, running attendance, shifts, leaves, payroll and statutory filings in one place. It is built by Petpooja, serving Indian businesses since 2011, and used by 40,000+ businesses today.

Does the Law Require an Employee Code?

No. Neither the Occupational Safety, Health and Working Conditions Code, 2020 nor the Code on Wages uses the phrase at all.

What they require is the paperwork a code holds together. Section 33 of the OSH Code says an employer shall maintain a register in the prescribed form, electronically or otherwise, carrying the prescribed particulars of workers.

What the Register Has to Show

The Code names some of what it must show:

  • Work performed, and the hours making a normal working day
  • The day of rest allowed in every seven
  • Wages paid, and the receipts given for them
  • Leave, leave wages, overtime and attendance
  • The employment of adolescents

That list is a floor, not a ceiling. Your government may prescribe more.

Section 50 of the Code on Wages, 2019 asks for much the same, in any establishment the Code applies to: a register with the details of persons employed, the muster roll and wages. It also requires wage slips.

There is one narrow carve-out. Those duties fall away to the extent an employer engages not more than five people for agriculture or domestic work.

Read that as a limit on how far the exemption reaches, not a free pass for the employer.

The Appointment Letter Duty

There is a second duty worth knowing. Section 6 of the OSH Code requires a letter of appointment for every employee, in the prescribed form. Anyone who did not have one when the Code commenced had to be issued one within three months.

None of that names a code. But a register, a wage slip and an appointment letter all describe the same person, and something has to say they are the same person. Our statutory register formats show the columns those records carry.

The four labour codes took effect on 21 November 2025, so these are the duties in force now, not a proposal.

What Makes an Employee Code Break?

Asking it to describe something. A code that carries meaning is a code with an expiry date.

What makes a code fixed Three rules hold it steady. Three habits pull it apart. RULES THAT KEEP IT FIXED One per person Never issued twice, not even to a new joiner A leaver keeps theirs, so their history stays theirs. Steady for the service The same from joining to settlement A promotion or a transfer is not a new person. Identical everywhere Register, payslip, bank file, device One mismatch and a punch cannot be placed. HABITS THAT PULL IT APART Branch or grade inside Both move when the person moves Give each its own column instead. Joining year inside Useful once, then only noise The record already carries the date. Renumbering later Every old record still cites the old one Printed rosters and signed registers do not update. Hold the top three and the bottom three go away. Duties: the OSH Code, 2020, sections 6 and 33
The top three are what keeps a code fixed. The bottom three are what quietly breaks it.

Three failure modes cover almost everything that goes wrong, and each one starts as a reasonable idea.

Reusing a Leaver’s Code

The tidiest-looking mistake. Someone leaves, their code is free, the next joiner gets it.

Now two people share an identity. Last year’s attendance, last year’s payslips and last year’s full and final settlement all attach to whoever holds that code today.

An audit that asks what this person was paid in a given month gets an answer covering two people, and the appointment letter on file names only one of them.

The record outlives the employment. Somebody can ask about a month that person worked long after their last day, and the answer has to point at one human being.

Codes are cheap. Leavers keep theirs.

Putting Meaning Inside the Code

Branch, department, designation, grade and joining year all look like useful things to encode. Every one of them either moves with the person or stops being the thing you want to sort by.

A fabrication unit in Coimbatore that codes people as welder or fitter has to choose, the day somebody retrains, between a wrong code and a new one. Both are worse than a code that never meant anything.

Keep those facts in their own columns, where changing one does not rewrite who somebody is.

Undoing it later is the expensive part. The code is not just in your software, it is on printed rosters, signed registers and every sheet anyone has exported, and none of those update themselves.

Letting Two Systems Disagree

The attendance device, the payroll sheet and the bank file each hold a code. If they were set up at different times by different people, they hold different codes.

Month-end matches them up by name, names collide, and a payment lands somewhere it should not. Settle on one system as the place codes come from, and the problem stops travelling to the next branch.

You usually find out at the point of payment, which is the worst place to find out. Checking the codes agree before a run costs an hour. Getting money back after one costs a great deal more.

A school in Pune hit this when a payroll sheet and a biometric device were set up a year apart. A diagnostic lab chain in Hyderabad hit it opening a fourth branch, where nobody knew which system to ask.

How to Build an Employee Code Format

Start from what keeps a number fixed and add nothing. A prefix, a running number and enough digits to last are the whole design.

ChoiceWhat worksWhy
LengthThe same number of digits every timeFor example write 0007, not 7, so codes sort and search properly
PrefixOne short prefix for the whole business, or noneA per-branch prefix breaks on the first transfer
NumberingA simple running seriesGaps are fine. Reuse is not
Starting pointNot at 1A code of 1 reads like a placeholder, and gets treated as one
LeaversRetire the code with the personHistory stays attached to one human being
ChangesDo not renumber, everA renumbering breaks every record that already cites the old code
Format practice, not law. Neither Code prescribes a length, a prefix or a numbering scheme, so these are conventions that hold up rather than requirements.

Whatever you pick, apply it when the person is created rather than later. Our guide to adding an employee covers the record it belongs to, and bulk adding employees matters most here, because an import is where duplicate codes usually enter a system.

Where Must the Employee Code Match?

Everywhere the same person appears, which is more places than most businesses realise.

RecordWhat it is forWhat breaks if the code differs
Muster roll and attendance registerThe statutory record of who worked whenAttendance cannot be reconciled to a person
Wage register and payslipWhat was paid and whyA pay dispute has no single trail to follow
Attendance device or appWhere the punch comes fromPunches arrive for somebody payroll cannot place
Bank transfer fileWhere the money goesPayment to the wrong account, found after it clears
Full and final settlementThe closing calculationService history is taken from the wrong record
One person, five places, and only the code ties them together.

Two other numbers get confused with the employee code, and neither is yours. The provident fund number follows a person between employers. The employee insurance number comes from the state insurance scheme.

Your code is internal, and you control it. Our guide to EPF forms covers the first of those.

That leaves the practical question. Where does the code live, so all five of those records end up reading the same one?

Where Attendo Fits

The employee master holds the employee code, which Attendo calls the employee ID, alongside name, department, designation and branch, so the things that change sit in their own fields rather than inside the code.

Every payroll table stacks the employee ID under the name, and the filter has an All, Name or Emp ID selector, so two people with the same name stay distinguishable on screen.

Excel and PDF exports keep name and ID as separate columns, which is what an auditor asking about one person actually needs.

If you want employee records kept this way, you can take a look at Attendo, or read how it works end to end first.

Your Employee Code Checklist

Most employee code trouble is not a bad format. It is a good format applied inconsistently, usually during an import or a branch opening.

If I had to check one thing before the next payroll run, it would be whether any code appears twice, counting leavers. That one check is where both the reuse problem and the import problem show up.

  1. Decide which system owns the code, and write the answer down where the next person to open a branch will find it.
  2. Pick a fixed width and a single prefix, or no prefix at all.
  3. Keep department, branch, grade and joining year out of the code and in their own fields.
  4. Retire a leaver’s code with them, and never issue it again.
  5. Check for duplicates after every bulk import, before the first payroll run that uses them.
  6. Check the code matches across attendance, payroll and the bank file once, then keep them in step.

The salary sheet and payroll register template shows where the code sits on the page. The attendance to salary run shows what it has to survive between a punch and a payment.

Frequently Asked Questions

1. What is an employee code?
A short number a business gives to each person on its payroll, and to nobody else, used to identify them in attendance, payroll and statutory records. It is internal to the employer and is not issued by any government department.
2. Is an employee code legally required in India?
No. Neither the Code on Wages, 2019 nor the Occupational Safety, Health and Working Conditions Code, 2020 uses the phrase. Both require a register kept as the government prescribes, and both require wage slips. Section 6 of the OSH Code requires an appointment letter for every employee.
3. What is a good employee code format?
A fixed width, one prefix or none, and a simple running number that starts above single digits. No Code prescribes a format, so this is practice rather than law. Keeping department, branch and grade out of it is what makes it last.
4. Can an employee code be reused after someone leaves?
It should not be. The new holder inherits the previous person’s attendance, payslips and settlement history, so a question about a month either of them worked returns an answer covering both. Retire the code with the person.
5. Is the employee code the same as the provident fund number?
No. The provident fund number follows a person between employers, and the employee insurance number comes from the state insurance scheme. The employee code is yours, it applies only inside your business, and you control how it is set.
6. Should the employee code change on promotion or transfer?
No. A promotion or a transfer changes the designation and the branch, both of which live in their own fields. Changing the code breaks every record that already cites the old one, from the muster roll to the bank file.
See all results