About this tool
The Payslip Generator turns a month of pay into a payslip document you can hand to an employee, print or email as a PDF. You fill in the employer details, the employee details and the pay period, then the basic salary, any overtime hours, and any extra earning or deduction lines the month happens to need. Tax on Salary and the employee NSSF contribution are calculated automatically from the same finance core as the payroll tools, with the option to override either figure when an employer’s own calculation differs. The result is a reconciled document — gross, deductions, net pay and the employer’s own NSSF cost are shown separately — in English, Khmer or both, with the logo embedded in the PDF. It is written for small businesses in Cambodia that have no payroll software, for HR staff producing a template before a system goes live, and for employees who need a readable record of what was deducted. It is not a compliant payroll system: it does not file the monthly TOS or NSSF declaration, does not keep records, and the PDF is not a substitute for a signed payslip under company policy. None of it is legal or tax advice.
How it works
Everything happens in the browser through `lib/finance/payslip-model.ts`, which delegates the tax and NSSF maths to `computePayslip`. Basic salary becomes the first earning line. Overtime is priced with `computeOvertime` from a base hourly rate you enter and three buckets — ordinary at 1.5, regular night at 1.3, night or weekly-rest overtime at 2.0 — and each bucket becomes its own earning line. Custom earnings are added at the value you type. Tax on Salary and both NSSF sides are computed on the taxable salary — basic plus overtime plus every custom earning line flagged taxable — which is how a payroll system treats a month with heavy overtime. A custom line can be marked non-taxable (for example an expense reimbursement) to keep it in gross pay but out of the tax and contribution bases. Employee NSSF uses the wage bands and is deducted unless you switch it off, and any manual override is applied and flagged in the preview. The document model also carries a reconciliation flag that records whether gross minus deductions equals net pay. Logo upload accepts PNG, JPEG, GIF or WebP up to 2 MB and rejects SVG.
Use cases
- A small business in Siem Reap issuing a first payslip to a new employee without buying payroll software
- An HR officer producing a bilingual Khmer and English payslip for a mixed-language workplace
- A garment factory line supervisor preparing a sample payslip to explain overtime lines to workers
- An accountant checking a client’s payslip arithmetic by rebuilding it from the gross salary
- An employee who never received a payslip reconstructing one from their bank deposits and contract
- A startup documenting a salary review by generating the before and after payslips for the file
- A household employer paying a domestic worker and wanting a written record of deductions
Frequently asked questions
Is the PDF a legally compliant payslip?
No. It is a document generator, not a compliance system. It does not certify that the figures match what the employer declared, does not carry a company seal, does not store an audit trail and does not replace whatever format the employer is required to keep. The PDF carries a disclaimer saying so. Use it as a readable record of a calculation, and keep your official payroll records separately.
Is my data sent to a server?
No. The form state, the logo file and the PDF rendering all stay in the browser — the document is built with a client-side PDF renderer and the logo is read as a local data URL. Nothing is uploaded and nothing is stored between visits. The site’s event log records only the action names, such as download or reset, never a name, an ID, a date, a salary or the PDF itself.
Why is the tax lower than my payroll system shows?
Check the taxable flags first: a custom earning line marked non-taxable stays out of the TOS base even though it is part of gross pay, which is correct for an expense reimbursement but wrong for a bonus. TOS itself covers basic plus overtime plus taxable lines — if your payroll system still shows a different figure, compare the dependent count and residency setting, or override the TOS line with the employer’s amount and accept that the override badge appears on the document.
What does the override badge mean?
It means the figure on the payslip was typed in rather than calculated. Both the TOS and the NSSF line can be overridden, the override is shown as a badge in the preview and in the PDF, and the reconciliation still checks that gross minus deductions equals net pay. Overrides are useful when the employer’s payroll system has already computed a figure, or when a correction has to be shown explicitly.
Which currency should I use?
The calculation is always in riel. You can display the document in riel or in dollars, and the dollar view uses an exchange rate you type in — there is no live rate and no fallback, so a wrong rate produces a wrong dollar column. Most Cambodian payslips are issued in riel with a dollar reference, which the bilingual option supports.
Can I include a company logo?
Yes. PNG, JPEG, GIF and WebP are accepted up to 2 MB, and the file is read locally and embedded in the PDF. SVG and HTML are rejected deliberately, because a logo is untrusted input and those formats can carry executable content. If your logo is an SVG, export a PNG first — the PDF will look the same at payslip size.
Does it calculate the employer’s NSSF cost?
It shows it, on a separate block, because the employer pays it on top of gross salary and it must not be confused with the employee deduction. Employer NSSF is 2.6% healthcare (fully employer-borne since 2018) plus 0.8% occupational risk plus 2% pension, applied to the contributory wage bands, and the total employer cost line adds it to gross. Like the employee side it is computed on the taxable salary, so overtime and taxable earning lines raise it as well — capped at the same 1,200,000 KHR ceiling.
What happens if the totals do not reconcile?
The document model checks that net pay plus deductions equals gross pay and reports whether it does. In normal use the two always match, because net pay is defined as gross minus deductions. A mismatch only appears if a value is edited outside the calculation path, and it is a signal that something is wrong rather than a normal state. Treat any unreconciled document as unusable.
Data and accuracy
No external data is fetched. Tax on Salary comes from `lib/finance/tos.ts` (Sub-Decree №48 OrNKr.BK of 11 March 2024, Article 3, and GDT Prakas №575 MEF.PK.GDT of 19 September 2024), NSSF from `lib/finance/nssf.ts` (Prakas №449 of 10 November 2017 for healthcare and Sub-Decree №32 of 4 March 2021 for pension), and overtime from `lib/finance/overtime.ts` (Labour Law Articles 139 and 144). All three were last reviewed 2026-08-26. The USD display rate is entered by the user and is never fetched. The instruments are published on the GDT, NSSF and MLVT indexes linked below; this page was checked against them on 21 October 2026.
Sources
- GDT — Sub-Decree index (Sub-Decree №48 OrNKr.BK, 11 March 2024, Article 3: monthly TOS brackets and dependent reduction) — General Department of Taxation, Ministry of Economy and Finance
- NSSF — Prakas index (Prakas №449, 10 November 2017, effective 1 January 2018: healthcare contribution) — National Social Security Fund (NSSF)
- Sub-Decree №32 (4 March 2021) — NSSF pension scheme — National Social Security Fund (NSSF)
- Labour Law (Royal Kram NS/RKM/0707/020), Article 139 — overtime multipliers — Ministry of Labour and Vocational Training
Content last reviewed 21 October 2026