Sample CRA XML files for T4, NR4, T5018 and T1204
Generated by TaxXML from its sample spreadsheets
These are complete XML files of the kind you upload to CRA's Internet File Transfer (IFT), one per return, for the 2027 filing season (tax year 2026). Each one was generated by the TaxXML converter from its sample spreadsheet and validates against CRA XML schema 1-27-1, which CRA accepts from January 11, 2027. Until December 22, 2026, CRA accepts schema 1-26-3 instead. The T4, T5018 and T1204 files here are valid under 1-26-3 too; the NR4 file is not, because 1-26-3 has no CIN element. CRA publishes a new schema for each filing year, so check which version applies when you file. Every name, SIN, account number and amount in them is made up, and the transmitter and payer are marked DEMO. Don't file these files.
Examples, not advice
These samples show the structure of a valid file. They are not tax, legal, or accounting advice. CRA specifications change, so always check your own files against the CRA's official XML specifications for information returns before you file.
Jump to: T619 wrapper · T4 · NR4 · T5018 · T1204
The T619 wrapper every file shares
Every file is one <Submission> with a <T619> transmitter record, then a <Return> holding one return: its slips first, then its summary. CRA rejects empty optional tags, so optional fields with no value are left out entirely.
TransmitterAccountNumber/bn15: the transmitter's CRA account number, usually the 15-character business number.sbmt_ref_id: Submission Reference ID, up to 8 letters or digits, new for every file you send.summ_cnt: the number of summaries in the file. TaxXML always sends one.lang_cd: language of the submission,EorF.TransmitterName,TransmitterCountryCode: who is sending the file, and their country.CNTC: the transmitter's contact name, area code, phone number and email.
T4 sample XML
Two employees, one employer. Download T4_sample.xml · T4 XML guide · Make it yourself from the sample data
EMPE_NM,sin: the employee's name and 9-digit social insurance number.bn: the employer's payroll account, for example123456789RP0001, on every slip and the summary.cpp_qpp_xmpt_cd,ei_xmpt_cd: CPP/QPP and EI exemption indicators,0or1.empt_prov_cd: province of employment, as a 2-letter code.empr_dntl_ben_rpt_cd: the dental benefits code (Box 45).T4_AMT: the box amounts, such as employment income (Box 14), CPP contributions, EI premiums and income tax deducted.tx_yr,slp_cnt,T4_TAMT: on the summary, the tax year, the number of slips and the totals.rpt_tcd: report type.Ofor original,Afor amendment,Cfor cancel.
<?xml version="1.0" encoding="UTF-8"?>
<Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<T619>
<TransmitterAccountNumber><bn15>123456789MM0001</bn15></TransmitterAccountNumber>
<sbmt_ref_id>DEMO1</sbmt_ref_id>
<summ_cnt>1</summ_cnt>
<lang_cd>E</lang_cd>
<TransmitterName><l1_nm>DEMO Transmitter Inc</l1_nm></TransmitterName>
<TransmitterCountryCode>CAN</TransmitterCountryCode>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
<cntc_email_area>demo@example.com</cntc_email_area>
</CNTC>
</T619>
<Return>
<T4>
<T4Slip>
<EMPE_NM>
<snm>Doe</snm>
<gvn_nm>John</gvn_nm>
</EMPE_NM>
<sin>046454286</sin>
<bn>123456789RP0001</bn>
<cpp_qpp_xmpt_cd>0</cpp_qpp_xmpt_cd>
<ei_xmpt_cd>0</ei_xmpt_cd>
<rpt_tcd>O</rpt_tcd>
<empt_prov_cd>ON</empt_prov_cd>
<empr_dntl_ben_rpt_cd>1</empr_dntl_ben_rpt_cd>
<T4_AMT>
<empt_incamt>50000.00</empt_incamt>
<cpp_cntrb_amt>2500.00</cpp_cntrb_amt>
<empe_eip_amt>1000.00</empe_eip_amt>
<itx_ddct_amt>7500.00</itx_ddct_amt>
<ei_insu_ern_amt>50000.00</ei_insu_ern_amt>
<cpp_qpp_ern_amt>50000.00</cpp_qpp_ern_amt>
</T4_AMT>
</T4Slip>
<T4Slip>
<EMPE_NM>
<snm>Smith</snm>
<gvn_nm>Jane</gvn_nm>
</EMPE_NM>
<sin>130692544</sin>
<bn>123456789RP0001</bn>
<cpp_qpp_xmpt_cd>0</cpp_qpp_xmpt_cd>
<ei_xmpt_cd>0</ei_xmpt_cd>
<rpt_tcd>O</rpt_tcd>
<empt_prov_cd>BC</empt_prov_cd>
<empr_dntl_ben_rpt_cd>1</empr_dntl_ben_rpt_cd>
<T4_AMT>
<empt_incamt>60000.00</empt_incamt>
<cpp_cntrb_amt>3000.00</cpp_cntrb_amt>
<empe_eip_amt>1200.00</empe_eip_amt>
<itx_ddct_amt>9000.00</itx_ddct_amt>
<ei_insu_ern_amt>60000.00</ei_insu_ern_amt>
<cpp_qpp_ern_amt>60000.00</cpp_qpp_ern_amt>
</T4_AMT>
</T4Slip>
<T4Summary>
<bn>123456789RP0001</bn>
<EMPR_NM>
<l1_nm>DEMO Payer Ltd</l1_nm>
</EMPR_NM>
<EMPR_ADDR>
<addr_l1_txt>1 Demo Street</addr_l1_txt>
<cty_nm>Demo City</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>K1A0B1</pstl_cd>
</EMPR_ADDR>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
</CNTC>
<tx_yr>2026</tx_yr>
<slp_cnt>2</slp_cnt>
<rpt_tcd>O</rpt_tcd>
<T4_TAMT>
<tot_empt_incamt>110000.00</tot_empt_incamt>
<tot_empe_cpp_amt>5500.00</tot_empe_cpp_amt>
<tot_empe_eip_amt>2200.00</tot_empe_eip_amt>
<tot_itx_ddct_amt>16500.00</tot_itx_ddct_amt>
<tot_empr_cpp_amt>5500.00</tot_empr_cpp_amt>
<tot_empr_eip_amt>3080.00</tot_empr_eip_amt>
</T4_TAMT>
</T4Summary>
</T4>
</Return>
</Submission>
NR4 sample XML
Two non-resident recipients: an individual and a corporation. Download NR4_sample.xml · NR4 XML guide · Make it yourself from the sample data
nr_acct_nbr: the payer's non-resident account number, 3 letters and 6 digits. The same number goes on the summary and every slip.RCPNT_NMorENTPRS_NM: the recipient's name. Individuals and joint accounts useRCPNT_NM; corporations and everyone else useENTPRS_NM.RCPNT_ADDR: a foreign address, so it usesste_cdandfgn_pstl_cdinstead of a province and postal code.tx_cntry_cd,fssn_nbr: the recipient's 3-letter country of tax residence (Box 12) and their foreign tax identification number (Box 30 on 2027 slips).CIN, new in schema 1-27-1: the recipient's Canadian tax identification number (Box 13), assin_ttn_itn,bnortrust. Neither sample recipient has one, so both carry<sin_ttn_itn>000000000</sin_ttn_itn>, as CRA instructs.rcpnt_tcd: recipient type.1individual,2joint account,3corporation,4other,5government or international organization.inc_1_tcd,crcy_1_cd: the income code (Box 14) and currency code (Box 15).NR4_AMT: gross income (Box 16) and non-resident tax withheld (Box 17).rpt_tcd: report type.Ofor original,Afor amendment,Cfor cancel on a slip. The summary takesOorAonly.
<?xml version="1.0" encoding="UTF-8"?>
<Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<T619>
<TransmitterAccountNumber><bn15>123456789MM0001</bn15></TransmitterAccountNumber>
<sbmt_ref_id>DEMO1</sbmt_ref_id>
<summ_cnt>1</summ_cnt>
<lang_cd>E</lang_cd>
<TransmitterName><l1_nm>DEMO Transmitter Inc</l1_nm></TransmitterName>
<TransmitterCountryCode>CAN</TransmitterCountryCode>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
<cntc_email_area>demo@example.com</cntc_email_area>
</CNTC>
</T619>
<Return>
<NR4>
<NR4Slip>
<RCPNT_NM><snm>Smith</snm><gvn_nm>John</gvn_nm></RCPNT_NM>
<RCPNT_ADDR><addr_l1_txt>123 Main St</addr_l1_txt><cty_nm>Seattle</cty_nm><ste_cd>WA</ste_cd><fgn_pstl_cd>98101</fgn_pstl_cd><cntry_cd>USA</cntry_cd></RCPNT_ADDR>
<tx_cntry_cd>USA</tx_cntry_cd>
<CIN><sin_ttn_itn>000000000</sin_ttn_itn></CIN>
<fssn_nbr>987-65-4320</fssn_nbr>
<nr_acct_nbr>NRA123456</nr_acct_nbr>
<rcpnt_tcd>1</rcpnt_tcd>
<inc_1_tcd>06</inc_1_tcd>
<crcy_1_cd>CAD</crcy_1_cd>
<NR4_AMT><gro_1_incamt>5000.00</gro_1_incamt><nr_tx_1_amt>750.00</nr_tx_1_amt></NR4_AMT>
<rpt_tcd>O</rpt_tcd>
</NR4Slip>
<NR4Slip>
<ENTPRS_NM><l1_nm>Hafen Holdings GmbH</l1_nm></ENTPRS_NM>
<RCPNT_ADDR><addr_l1_txt>Hauptstrasse 5</addr_l1_txt><cty_nm>Berlin</cty_nm><fgn_pstl_cd>10115</fgn_pstl_cd><cntry_cd>DEU</cntry_cd></RCPNT_ADDR>
<tx_cntry_cd>DEU</tx_cntry_cd>
<CIN><sin_ttn_itn>000000000</sin_ttn_itn></CIN>
<fssn_nbr>DE123456789</fssn_nbr>
<nr_acct_nbr>NRA123456</nr_acct_nbr>
<rcpnt_tcd>3</rcpnt_tcd>
<inc_1_tcd>02</inc_1_tcd>
<crcy_1_cd>CAD</crcy_1_cd>
<NR4_AMT><gro_1_incamt>10000.00</gro_1_incamt><nr_tx_1_amt>2500.00</nr_tx_1_amt></NR4_AMT>
<rpt_tcd>O</rpt_tcd>
</NR4Slip>
<NR4Summary>
<nr_acct_nbr>NRA123456</nr_acct_nbr>
<PAYR_NM><l1_nm>DEMO Payer Ltd</l1_nm></PAYR_NM>
<PAYR_ADDR>
<addr_l1_txt>1 Demo Street</addr_l1_txt>
<cty_nm>Demo City</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>K1A0B1</pstl_cd>
</PAYR_ADDR>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
</CNTC>
<tx_yr>2026</tx_yr>
<slp_cnt>2</slp_cnt>
<rpt_tcd>O</rpt_tcd>
<NR4_TAMT><tot_gro_1_incamt>15000.00</tot_gro_1_incamt><tot_nr_tx_1_amt>3250.00</tot_nr_tx_1_amt></NR4_TAMT>
</NR4Summary>
</NR4>
</Return>
</Submission>
T5018 sample XML
Two subcontractors: a corporation and an individual. Download T5018_sample.xml · T5018 XML guide · Make it yourself from the sample data
bn: the payer's 15-character account number on the RZ program, for example123456789RZ0001, on every slip and the summary.RCPNT_NMorCORP_PTNRP_NM: the subcontractor's name. Individuals useRCPNT_NM; corporations and partnerships useCORP_PTNRP_NM.sin,rcpnt_bn: the subcontractor's social insurance number or business number (Box 24). Both tags appear on every slip; the one that doesn't apply gets a zero placeholder.rcpnt_tcd: recipient type, such as individual or corporation.sbctrcr_amt: the construction subcontract payments for the period (Box 22).PRD_END_DT: on the summary, the day, month and year the reporting period ends.slp_cnt,tot_sbctrcr_amt: on the summary, the number of slips and the total paid.rpt_tcd: report type.Ofor original,Afor amendment,Cfor cancel.
<?xml version="1.0" encoding="UTF-8"?>
<Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<T619>
<TransmitterAccountNumber><bn15>123456789MM0001</bn15></TransmitterAccountNumber>
<sbmt_ref_id>DEMO1</sbmt_ref_id>
<summ_cnt>1</summ_cnt>
<lang_cd>E</lang_cd>
<TransmitterName><l1_nm>DEMO Transmitter Inc</l1_nm></TransmitterName>
<TransmitterCountryCode>CAN</TransmitterCountryCode>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
<cntc_email_area>demo@example.com</cntc_email_area>
</CNTC>
</T619>
<Return>
<T5018>
<T5018Slip>
<sin>000000000</sin>
<rcpnt_bn>123456789RT0001</rcpnt_bn>
<CORP_PTNRP_NM><l1_nm>BuildIt Inc</l1_nm></CORP_PTNRP_NM>
<rcpnt_tcd>3</rcpnt_tcd>
<RCPNT_ADDR>
<addr_l1_txt>123 Builder Lane</addr_l1_txt>
<cty_nm>Vancouver</cty_nm>
<prov_cd>BC</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>V6B1A1</pstl_cd>
</RCPNT_ADDR>
<bn>123456789RZ0001</bn>
<sbctrcr_amt>125000.00</sbctrcr_amt>
<rpt_tcd>O</rpt_tcd>
</T5018Slip>
<T5018Slip>
<RCPNT_NM><snm>Plumber</snm><gvn_nm>Jane</gvn_nm></RCPNT_NM>
<sin>046454286</sin>
<rcpnt_bn>000000000RC0000</rcpnt_bn>
<CORP_PTNRP_NM><l1_nm>Jane Plumber</l1_nm></CORP_PTNRP_NM>
<rcpnt_tcd>1</rcpnt_tcd>
<RCPNT_ADDR>
<addr_l1_txt>789 Pipe St</addr_l1_txt>
<cty_nm>Calgary</cty_nm>
<prov_cd>AB</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>T2P2M5</pstl_cd>
</RCPNT_ADDR>
<bn>123456789RZ0001</bn>
<sbctrcr_amt>4500.00</sbctrcr_amt>
<rpt_tcd>O</rpt_tcd>
</T5018Slip>
<T5018Summary>
<bn>123456789RZ0001</bn>
<PAYR_NM>
<l1_nm>DEMO Payer Ltd</l1_nm>
</PAYR_NM>
<PAYR_ADDR>
<addr_l1_txt>1 Demo Street</addr_l1_txt>
<cty_nm>Demo City</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>K1A0B1</pstl_cd>
</PAYR_ADDR>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
</CNTC>
<PRD_END_DT>
<dy>31</dy>
<mo>12</mo>
<yr>2026</yr>
</PRD_END_DT>
<slp_cnt>2</slp_cnt>
<tot_sbctrcr_amt>129500.00</tot_sbctrcr_amt>
<rpt_tcd>O</rpt_tcd>
</T5018Summary>
</T5018>
</Return>
</Submission>
T1204 sample XML
Two contractors: a corporation paid for services only and a sole proprietor paid for mixed goods and services. Download T1204_sample.xml · T1204 XML guide · Make it yourself from the sample data
payr_bn: on each slip, the paying department's 15-character payroll (RP) account number. The summary carries it asbn.RCPNT_NM,RCPNT_BUS_NM: the recipient's name (sole proprietors) and business name.sin,rcpnt_bn: the recipient's social insurance number or business number. Both tags appear on every slip; the one that doesn't apply gets a zero placeholder.rcpnt_tcd: recipient type:1sole proprietor,3corporation,4partnership.T1204_AMT: the amount paid, assrvc_pay_amtfor service-only payments ormxd_gd_pay_amtfor mixed goods and services.tx_yr,slp_cnt,T1204_TAMT: on the summary, the tax year, the number of slips and the totals for each kind of payment.rpt_tcd: report type.Ofor original,Afor amendment,Cfor cancel.
<?xml version="1.0" encoding="UTF-8"?>
<Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<T619>
<TransmitterAccountNumber><bn15>123456789MM0001</bn15></TransmitterAccountNumber>
<sbmt_ref_id>DEMO1</sbmt_ref_id>
<summ_cnt>1</summ_cnt>
<lang_cd>E</lang_cd>
<TransmitterName><l1_nm>DEMO Transmitter Inc</l1_nm></TransmitterName>
<TransmitterCountryCode>CAN</TransmitterCountryCode>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
<cntc_email_area>demo@example.com</cntc_email_area>
</CNTC>
</T619>
<Return>
<T1204>
<T1204Slip>
<sin>000000000</sin>
<rcpnt_bn>123456789RT0001</rcpnt_bn>
<RCPNT_BUS_NM><l1_nm>Acme Corp</l1_nm></RCPNT_BUS_NM>
<rcpnt_tcd>3</rcpnt_tcd>
<RCPNT_BUS_ADDR>
<addr_l1_txt>123 Main St</addr_l1_txt>
<cty_nm>Ottawa</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>K1A0B1</pstl_cd>
</RCPNT_BUS_ADDR>
<payr_bn>123456789RP0001</payr_bn>
<T1204_AMT><srvc_pay_amt>15000.00</srvc_pay_amt></T1204_AMT>
<rpt_tcd>O</rpt_tcd>
</T1204Slip>
<T1204Slip>
<RCPNT_NM><snm>Contractor</snm><gvn_nm>Bob</gvn_nm></RCPNT_NM>
<sin>046454286</sin>
<rcpnt_bn>000000000RT0000</rcpnt_bn>
<RCPNT_BUS_NM><l1_nm>Bob Contractor</l1_nm></RCPNT_BUS_NM>
<rcpnt_tcd>1</rcpnt_tcd>
<RCPNT_BUS_ADDR>
<addr_l1_txt>456 Side Ave</addr_l1_txt>
<cty_nm>Toronto</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>M5V2H1</pstl_cd>
</RCPNT_BUS_ADDR>
<payr_bn>123456789RP0001</payr_bn>
<T1204_AMT><mxd_gd_pay_amt>5000.00</mxd_gd_pay_amt></T1204_AMT>
<rpt_tcd>O</rpt_tcd>
</T1204Slip>
<T1204Summary>
<bn>123456789RP0001</bn>
<PAYR_NM><l1_nm>DEMO Payer Ltd</l1_nm></PAYR_NM>
<PAYR_ADDR>
<addr_l1_txt>1 Demo Street</addr_l1_txt>
<cty_nm>Demo City</cty_nm>
<prov_cd>ON</prov_cd>
<cntry_cd>CAN</cntry_cd>
<pstl_cd>K1A0B1</pstl_cd>
</PAYR_ADDR>
<CNTC>
<cntc_nm>Demo Contact</cntc_nm>
<cntc_area_cd>555</cntc_area_cd>
<cntc_phn_nbr>555-0100</cntc_phn_nbr>
</CNTC>
<tx_yr>2026</tx_yr>
<slp_cnt>2</slp_cnt>
<rpt_tcd>O</rpt_tcd>
<T1204_TAMT>
<tot_srvc_pay_amt>15000.00</tot_srvc_pay_amt>
<tot_mxd_gd_pay_amt>5000.00</tot_mxd_gd_pay_amt>
</T1204_TAMT>
</T1204Summary>
</T1204>
</Return>
</Submission>
Make your own
The TaxXML converter builds the same structure from your own spreadsheet, in your browser. CRA's full rules are on its XML specifications page.