<PAGE>
 
As filed with the Securities and Exchange Commission
on January 22, 1999

                                                   Registration No. 333-________


                       SECURITIES AND EXCHANGE COMMISSION
                             WASHINGTON D.C. 20549
                ------------------------------------------------
                                    FORM S-8
                             REGISTRATION STATEMENT
                                     UNDER
                           THE SECURITIES ACT OF 1933
                ------------------------------------------------
                              MASTECH CORPORATION

        Pennsylvania                                          25-1802235
  (State or jurisdiction of                                (I.R.S. Employer
Incorporation or organization)                            Identification No.)


                                1004 McKee Road
                          Oakdale, Pennsylvania 15071
             (Address of principal executive offices and zip code)
                  -------------------------------------------
                              MASTECH CORPORATION
                 AMENDED AND RESTATED 1996 STOCK INCENTIVE PLAN
                            (Full title of the plan)
                  -------------------------------------------
                 Jeffrey A. McCandless, Vice President-Finance
                              Mastech Corporation
                                1004 McKee Road
                               Oakdale, PA 15071
                    (Name and address of agent for service)
                                  412-787-2100
                    (Telephone number of agent for service)

                          Copies of communications to:
                            James J. Barnes, Esquire
                  Buchanan Ingersoll Professional Corporation
                               One Oxford Centre
                          301 Grant Street, 20th Floor
                           Pittsburgh, PA 15219-1410
                                  412-562-1415
                  -------------------------------------------
                        CALCULATION OF REGISTRATION FEE

<TABLE>
<CAPTION>
 
==================================================================================================================================
                                                               Proposed Maximum         Proposed Maximum
Title of Securities To Be                 Amount to Be         Offering Price Per       Aggregate Offering      Amount of
Registered(1)                             Registered(1)        Share(2)                 Price(2)                Registration Fee(2)

----------------------------------------------------------------------------------------------------------------------------------- 
<S>                                       <C>                  <C>                      <C>                     <C>  
Common stock (par value $.01
per share)                                  3,500,000               $26.50                $92,750,000.00           $25,784.50
----------------------------------------------------------------------------------------------------------------------------------- 

Total                                       3,500,000               $26.50                $92,750,000.00           $25,784.50
================================================================================================================================== 
</TABLE>


(1)  The provisions of Rule 416 shall apply to the number of shares registered
     on this Registration Statement and shall automatically increase or decrease
     as a result of future stock splits, stock dividends or similar
     transactions.

(2)  Estimated solely for purposes of calculating the registration fee pursuant
     to Rule 457(h).  Such price, which is the average of the high and low
     prices for the Common Stock on the NASDAQ  National Market, as reported in
     The Wall Street Journal, Midwest Edition, on January 15, 1999, has been
     determined in accordance with Rule 457(c).
<PAGE>
 
                                EXPLANATORY NOTE
                                ----------------

     Pursuant to General Instruction E. of Form S-8, this Registration 
Statement registers an additional 3,500,000 shares of Common Stock of Mastech
Corporation (the "Company") that may be awarded under the Company's Amended and
Restated 1996 Stock Incentive Plan.


                                    Part II
                                        
               INFORMATION REQUIRED IN THE REGISTRATION STATEMENT

     The contents of the Registration Statement on Form S-8 as filed on 
January 17, 1997, Registration No. 333-20033, as the same may be hereafter
amended is incorporated by reference into this Registration Statement.



Item 5. Interest of Named Experts and Counsel

     The validity of the shares of Common Stock will be passed upon for the 
Company by Buchanan Ingersoll Professional Corporation, Pittsburgh, 
Pennsylvania. Carl A. Cohen, a shareholder of Buchanan Ingersoll Professional 
Corporation, owned 2,000 shares of Common Stock as of January 22, 1999.


<PAGE>
 
ITEM 8. EXHIBITS

<TABLE>
<CAPTION>

Exhibits                                             Description

<C>           <S>
   4.1        Amended and Restated 1996 Stock Incentive Plan (Incorporated herein by reference is Exhibit
              10.1 to the Registrant's Quarterly Report on Form 10-Q dated November 16, 1998) (File Number
              0-21755).

   5.1        Opinion of Buchanan Ingersoll Professional Corporation with respect to the legality of the securities
              registered hereunder.
              
  23.1        Consent of Arthur Andersen LLP.

  23.2        Consent of Buchanan Ingersoll Professional Corporation (included in Exhibit 5.1 filed herewith).

  24.1        Powers of Attorney (included on signature Page).

</TABLE>

                                      -2-
<PAGE>

                               POWER OF ATTORNEY


     KNOW ALL MEN BY THESE PRESENTS, that each person whose signature appears 
below constitutes and appoints Michael Zugay and Jeffrey McCandless to act as 
his true and lawful attorney-in-fact and agent, with full power of substitution 
and resubstitution, for him and in his name, place and stead, in any and all 
capacities, to sign any or all post-effective amendments to the foregoing 
filings and to file the same with all exhibits thereto and all documents in 
connection therewith, with the Securities and Exchange Commission, granting unto
said attorney-in-fact and agent full power and authority to do and perform each 
and every act and thing requisite and necessary to be done, as fully and to all 
intents and purposes as he might or could do in person, hereby ratifying and 
confirming all that said attorney-in-fact or agent, or his substitute or 
substitutes or all of them may lawfully do or cause to be done by virtue hereof.

 
SIGNATURES

     Pursuant to the requirements of the Securities Act of 1933, the Registrant
certifies that it has reasonable grounds to believe that it meets all of the
requirements for filing on Form S-8 and has duly caused this Registration
Statement to be signed on its behalf by the undersigned, thereunto duly
authorized, in Pittsburgh, Pennsylvania, on the 22nd day of January, 1999.

                              MASTECH CORPORATION

                              By: /s/ Sunil Wadhwani
                                 -------------------
                                      Sunil Wadhwani

     Pursuant to the requirements of the Securities Act of 1933, this Post-
Effective Amendment to this Registration Statement has been signed by the
following persons in the capacities indicated on January 22, 1999.

     Signature                Capacity
     ---------                --------

/s/ Sunil Wadhwani            Director, Co-Chairman
------------------               and Chief Executive Officer  
Sunil Wadhwani                

/s/ Ashok Trivedi             Director, Co-Chairman and President
-----------------                                                  
Ashok Trivedi

/s/ J. Gordon Garrett         Director
---------------------                   
J. Gordon Garrett

/s/ Michel Berty              Director
----------------                        
Michel Berty

/s/ Jeffrey McCandless        Vice President-Finance
----------------------           (Principal Accounting Officer and
Jeffrey McCandless               Principal Financial Officer) 
                                   



                                      -3-
<PAGE>
 
                                 EXHIBIT INDEX
                                 -------------

<TABLE>
<CAPTION>

Exhibits                                                    Description

<C>               <S>
  4.1             Amended and Restated 1996 Stock Incentive Plan (Incorporated herein by reference is Exhibit
                  10.1 to the Registrant's Quarterly Report on Form 10-Q dated November 16, 1998) (File Number
                  0-21755).

  5.1             Opinion of Buchanan Ingersoll Professional Corporation with respect to the legality of the securities
                  registered hereunder.

 23.1             Consent of Arthur Andersen LLP.

 23.2             Consent of Buchanan Ingersoll Professional Corporation (included in Exhibit 5.1 filed herewith).

 24.1             Powers of Attorney (included on signature Page).

</TABLE>
[{"type": "S-8", "sequence": "1", "description": "REGISTRATION STATEMENT UNDER THE 1933 ACT", "secsgml_size_bytes": 9575}]
{"company-data": {"conformed-name": "MASTECH CORP", "cik": "0001024732", "assigned-sic": "7371", "irs-number": "251802235", "state-of-incorporation": "PA", "fiscal-year-end": "1231"}, "filing-values": {"form-type": "S-8", "act": "33", "file-number": "333-71057", "film-number": "99511609"}, "business-address": {"street1": "1004 MCKEE RD", "city": "OAKDALE", "state": "PA", "zip": "15071", "phone": "4127872100"}, "mail-address": {"street1": "1004 MCKEE RD", "city": "OAKDALE", "state": "PA", "zip": "15071"}}
As filed with the Securities and Exchange Commission
on January 22, 1999

                                                   Registration No. 333-________

                       SECURITIES AND EXCHANGE COMMISSION
                             WASHINGTON D.C. 20549
                ------------------------------------------------
                                    FORM S-8
                             REGISTRATION STATEMENT
                                     UNDER
                           THE SECURITIES ACT OF 1933
                ------------------------------------------------
                              MASTECH CORPORATION

        Pennsylvania                                          25-1802235
  (State or jurisdiction of                                (I.R.S. Employer
Incorporation or organization)                            Identification No.)

                                1004 McKee Road
                          Oakdale, Pennsylvania 15071
             (Address of principal executive offices and zip code)
                  -------------------------------------------
                              MASTECH CORPORATION
                 AMENDED AND RESTATED 1996 STOCK INCENTIVE PLAN
                            (Full title of the plan)
                  -------------------------------------------
                 Jeffrey A. McCandless, Vice President-Finance
                              Mastech Corporation
                                1004 McKee Road
                               Oakdale, PA 15071
                    (Name and address of agent for service)
                                  412-787-2100
                    (Telephone number of agent for service)

                          Copies of communications to:
                            James J. Barnes, Esquire
                  Buchanan Ingersoll Professional Corporation
                               One Oxford Centre
                          301 Grant Street, 20th Floor
                           Pittsburgh, PA 15219-1410
                                  412-562-1415
                  -------------------------------------------
                        CALCULATION OF REGISTRATION FEE
==================================================================================================================================
                                                               Proposed Maximum         Proposed Maximum
Title of Securities To Be                 Amount to Be         Offering Price Per       Aggregate Offering      Amount of
Registered(1)                             Registered(1)        Share(2)                 Price(2)                Registration Fee(2)

-----------------------------------------------------------------------------------------------------------------------------------
Common stock (par value $.01
per share)                                  3,500,000               $26.50                $92,750,000.00           $25,784.50
----------------------------------------------------------------------------------------------------------------------------------- 

Total                                       3,500,000               $26.50                $92,750,000.00           $25,784.50
==================================================================================================================================
(1)  The provisions of Rule 416 shall apply to the number of shares registered
     on this Registration Statement and shall automatically increase or decrease
     as a result of future stock splits, stock dividends or similar
     transactions.

(2)  Estimated solely for purposes of calculating the registration fee pursuant
     to Rule 457(h).  Such price, which is the average of the high and low
     prices for the Common Stock on the NASDAQ  National Market, as reported in
     The Wall Street Journal, Midwest Edition, on January 15, 1999, has been
     determined in accordance with Rule 457(c).
EXPLANATORY NOTE
                                ----------------

     Pursuant to General Instruction E. of Form S-8, this Registration 
Statement registers an additional 3,500,000 shares of Common Stock of Mastech
Corporation (the "Company") that may be awarded under the Company's Amended and
Restated 1996 Stock Incentive Plan.

                                    Part II
                                        
               INFORMATION REQUIRED IN THE REGISTRATION STATEMENT

     The contents of the Registration Statement on Form S-8 as filed on 
January 17, 1997, Registration No. 333-20033, as the same may be hereafter
amended is incorporated by reference into this Registration Statement.

Item 5. Interest of Named Experts and Counsel

     The validity of the shares of Common Stock will be passed upon for the 
Company by Buchanan Ingersoll Professional Corporation, Pittsburgh, 
Pennsylvania. Carl A. Cohen, a shareholder of Buchanan Ingersoll Professional 
Corporation, owned 2,000 shares of Common Stock as of January 22, 1999.
ITEM 8. EXHIBITS
Exhibits                                             Description
4.1        Amended and Restated 1996 Stock Incentive Plan (Incorporated herein by reference is Exhibit
              10.1 to the Registrant's Quarterly Report on Form 10-Q dated November 16, 1998) (File Number
              0-21755).

   5.1        Opinion of Buchanan Ingersoll Professional Corporation with respect to the legality of the securities
              registered hereunder.
              
  23.1        Consent of Arthur Andersen LLP.

  23.2        Consent of Buchanan Ingersoll Professional Corporation (included in Exhibit 5.1 filed herewith).

  24.1        Powers of Attorney (included on signature Page).
-2-
POWER OF ATTORNEY

     KNOW ALL MEN BY THESE PRESENTS, that each person whose signature appears 
below constitutes and appoints Michael Zugay and Jeffrey McCandless to act as 
his true and lawful attorney-in-fact and agent, with full power of substitution 
and resubstitution, for him and in his name, place and stead, in any and all 
capacities, to sign any or all post-effective amendments to the foregoing 
filings and to file the same with all exhibits thereto and all documents in 
connection therewith, with the Securities and Exchange Commission, granting unto
said attorney-in-fact and agent full power and authority to do and perform each 
and every act and thing requisite and necessary to be done, as fully and to all 
intents and purposes as he might or could do in person, hereby ratifying and 
confirming all that said attorney-in-fact or agent, or his substitute or 
substitutes or all of them may lawfully do or cause to be done by virtue hereof.

 
SIGNATURES

     Pursuant to the requirements of the Securities Act of 1933, the Registrant
certifies that it has reasonable grounds to believe that it meets all of the
requirements for filing on Form S-8 and has duly caused this Registration
Statement to be signed on its behalf by the undersigned, thereunto duly
authorized, in Pittsburgh, Pennsylvania, on the 22nd day of January, 1999.

                              MASTECH CORPORATION

                              By: /s/ Sunil Wadhwani
                                 -------------------
                                      Sunil Wadhwani

     Pursuant to the requirements of the Securities Act of 1933, this Post-
Effective Amendment to this Registration Statement has been signed by the
following persons in the capacities indicated on January 22, 1999.

     Signature                Capacity
     ---------                --------

/s/ Sunil Wadhwani            Director, Co-Chairman
------------------               and Chief Executive Officer  
Sunil Wadhwani                

/s/ Ashok Trivedi             Director, Co-Chairman and President
-----------------                                                  
Ashok Trivedi

/s/ J. Gordon Garrett         Director
---------------------                   
J. Gordon Garrett

/s/ Michel Berty              Director
----------------                        
Michel Berty

/s/ Jeffrey McCandless        Vice President-Finance
----------------------           (Principal Accounting Officer and
Jeffrey McCandless               Principal Financial Officer) 
                                   

                                      -3-
EXHIBIT INDEX
                                 -------------
Exhibits                                                    Description
4.1             Amended and Restated 1996 Stock Incentive Plan (Incorporated herein by reference is Exhibit
                  10.1 to the Registrant's Quarterly Report on Form 10-Q dated November 16, 1998) (File Number
                  0-21755).

  5.1             Opinion of Buchanan Ingersoll Professional Corporation with respect to the legality of the securities
                  registered hereunder.

 23.1             Consent of Arthur Andersen LLP.

 23.2             Consent of Buchanan Ingersoll Professional Corporation (included in Exhibit 5.1 filed herewith).

 24.1             Powers of Attorney (included on signature Page).