Yes, you can get a copy of your w-2 if you request a exact copy of your tax return. You can mail Form 4506 (PDF), Request for Copy of Tax Return along with a check or money order for $ 39.00 per tax year made payable to the "United States Treasury". Allow 60 calendar days to receive your copies.
You can obtain a transcript by calling (800)–829–1040 or by completing and mailing Form 4506-T (PDF), Request for Transcript of Tax Return, to the address listed in the instructions to request all types of transcript verification of non-filing, and wage/income information.
If you just want to a copy, you can request w2 upto 10 years from IRS for free, you can use Form 4506-T (PDF), Request for Transcript of Tax Return, to the address listed in the instructions to request wage/income information.
You may also get the earning information from social security administration with a fee for nonretirement purpose.
Call 1-800-772-1213, write, or visit the SSA web site at www.ssa.gov to obtain the information from the SSA. The address to write is SSA, Division of Earnings Records Operations, PO Box 33003, Baltimore, MDNNN-NN-NNNN
Here is the form
If you did not file income taxes last year, then you will not be able to get a copy of W-2's. In addition, while you may get a copy of the earnings statement from the SSA, it will not have all the information required to file an accurate return.
Unfortuately, IF YOU DID NOT FILE taxes for those years, you will have to get W-2's, by contacting your former emloyers, who may charge a small fee to provide them to you.
The only other source is to contact the Social Security Administration to request a copy of W-2's for non-retirement purposes.
Please read what the IRS has to say about this at:
Topic 159 - Prior Year(s) Form W-2 (How to Get a Copy of)
The IRS does not retain actual copies of Form W-2 (PDF) except as an attachment to your tax return, for prior years. However, the IRS maintains (and will provide free of charge) Form W-2 information for any purpose for the past ten processing years. The only way to get a copy of your Form W-2 from IRS is to order a copy of the entire return on Form 4506 (PDF), Request for Copy of Tax Return, and pay a fee of $39.00 per tax year.
The Social Security Administration will provide copies of Forms W-2 for retirement purposes at no charge and for other than retirement purposes for a fee of $37.00 per tax year.
Call 1–800–829–3676, or visit the IRS web site at www.irs.gov to obtain Form 4506, Request for Copy of Tax Return, or Form 4506-T (PDF), Request for Transcript of Tax Return, to order the information from the IRS.
Call 1–800–772–1213, write, or visit the SSA web site at www.ssa.gov to obtain the information from the SSA. The address to write is SSA, Division of Earnings Records Operations, PO Box 33003, Baltimore, MD 21290–3003. You will need your Social Security Number (SSN), name as shown on your Social Security card, and different name you may have had on your Form W-2, your complete mailing address, day-time phone number, years requested, and reason for your request. If ordering copies for non-retirement purposes, include the $37.00 fee