It pays to work for Google (GOOG).

The tech firm topped a list of the highest-paid software engineers, with an average base salary of $128,336. Facebook was second with an average base salary of $123,626, followed by Apple (AAPL) in the No. 3 spot at $114,413.

The salary data were released Wednesday by Glassdoor, which used salary reports shared over the last 12 months by software engineers at 15 tech companies. The data are based on anonymous reports voluntarily shared by current and recent employees.

The 2012 national average for a software engineer's base salary is $92,648 based on more than 5,000 salary reports, Glassdoor said. That's up 2.5 percent from 2011. Two of the 15 tech companies on the list came in under that average: Intel (INTC) ($92,194) and IBM ($89,390).

Last year, Google paid its software engineers an average base salary of $114,596 compared with Facebook's average base salary of $107,744.

Glassdoor also provided some choice quotes (read: bragging) from anonymous software engineers:

"Everybody who's paying attention knows how great the perks are. Between on-site gyms, massage, a wide selection of health benefits, 401k and stock grants, competitive salary, and of course the free, gourmet meals, it's one of the cushiest jobs in Silicon Valley." -- Google software engineer II (Mountain View)

"Amazing perks, job opportunities, co-workers, and compensation (in the tech industry). Extremely high levels of autonomy and work flexibility." -- Facebook software engineer (Menlo Park)

"Awesome perks, pay and bonuses (STOCKS :)). Good growth perspectives for engineering and engineering management roles. Amazing job security." -- Apple software engineer (Cupertino)

"Good salary and benefits. If you work hard and flaunt your accomplishments, making your boss look good, you can get recognized. They are trying hard to foster employee retention and growth, so you're encouraged to develop your skills through classes outside of work." -- Ebay senior software engineer (San Jose)

"Great package (salary, bonus, stock). Cool cutting-edge tech. Great benefits (delicious food, party, massage)." -- Zynga software engineer (San Francisco)