California DIR certified payroll XML converter

Turn a payroll spreadsheet into the XML file California's Department of Industrial Relations accepts for electronic certified payroll (eCPR). Every file is checked against DIR's official schema before you download it.

Runs entirely in your browser. Your payroll file, including Social Security numbers, is never uploaded to our servers.

1. Contractor

2. Project and week

Contractor and project details are remembered in this browser only.

3. Your payroll file

Use our CSV template: one row per worker per day worked. Worker details, rates, gross, deductions and net pay go on one of the worker's rows.

Drop your CSV here or click to choose a file
Excel or Google Sheets: save as CSV first

Fill in the contractor and project details, then choose your CSV file.

How to fill in the template

ColumnWhat to enter
first_name, middle_name, last_nameWorker name. DIR wants names in capitals; the converter does that for you.
ssnThe full 9-digit Social Security number. DIR's schema requires it for every worker. It stays in your browser.
address, city, state, zipWorker's home address: street up to 40 characters, city up to 25, a two-letter state (full names are converted), a 5-digit ZIP.
withholding_exemptionsNumber of withholding exemptions, 0 to 99. DIR requires a number for every worker.
work_classThe worker's classification for the week. DIR's file has one classification per worker.
st_rate, ot_rate, dt_rateHourly rates paid for straight time, overtime and double time (dt_rate only if double time was worked).
work_date, st_hours, ot_hours, dt_hoursOne row per day worked. Dates as YYYY-MM-DD or MM/DD/YYYY; hours to 2 decimals. The converter fills in the other days of the week with zeros.
gross_this_project, gross_all_workGross earned on this project, and for all work that week (the same if the worker worked only here).
fed_tax, fica, state_tax, sdiThe week's federal income tax, FICA, state income tax and SDI withheld.
vacation_holiday, health_welfare, pension, trainingFringe benefit contributions. See the note below on hourly rates and weekly amounts.
dues, savings, other_deductionsOther amounts withheld from pay. List what "other" covers in notes.
travel_subsistenceTravel or subsistence paid to the worker (not a deduction).
net_pay, check_numberNet pay for the week, and the check number (CASH if paid in cash, or the direct deposit transaction number).
notesOptional, up to 256 characters.

Hourly rates or weekly amounts for fringe benefits?

DIR's XML schema and its 2016 guidelines do not say whether the vacation/holiday, health and welfare, pension and training fields hold hourly rates or the week's total. After DIR's new public works site went live in June 2024, one California payroll software maker reported that DIR "now wants hourly values/rates of fringes reported instead of total fringe contributions for the week" (Sunburst Software Solutions). DIR has not published this itself. Enter the values the way DIR's online form shows them for your account, and check them after the upload: DIR loads the file into its online form for review before you sign.

What the converter checks

  • Every rule in DIR's XML schema for electronic California payroll records (CPR.xsd, version 1.3), validated with libxml2 in your browser.
  • DIR's file name pattern: last 4 digits of the FEIN, the DIR project ID and the week ending date.
  • One classification and one entry per worker, a full 9-digit SSN that matches the name entry, and no SSN used for two workers.
  • Dates inside the payroll week, at most 24 hours a day, rates and amounts to the cent, gross for all work not below gross on this project.
  • Total deductions (DIR's "Total Deductions" field) added up from the withholdings, and gross minus deductions equal to net, flagged when it is not.
  • Weeks with no work: a statement of non-performance with no worker entries, as DIR's schema requires.

What it does not check

The converter checks the file, not the wages. It does not compare rates with the prevailing wage determination for your craft and county. DIR's file holds one classification per worker for the week, and DIR has not published how to split one worker's deductions and net pay across classifications, so a worker in two classifications needs DIR's online form.

Want the file made from your payroll export every week, with underpayment checks and the WH-347? That is what the PrevailReady app does. New to DIR's system? Read the California eCPR guide.

PrevailReady is not affiliated with the California Department of Industrial Relations. Review your data in DIR's online form before submitting.