The Freedom of Information Act (FOIA) is a law that gives the public the right to request records from any federal agency. Federal agencies are required to disclose information requested under the FOIA unless it falls under one of nine exemptions. You can make a FOIA General Request for Social Security Records online or by mail:
Social Security Administration
Office of Privacy and Disclosure
617 Altmeyer Building
6401 Security Boulevard
Baltimore, MD 21235
See Guide to FOIA at SSA for more information, including fees involved with a request.