Over the years the National Aeronautics and Space Administration (NASA) has operated no less than 11 Starfighters for flight test purposes.
In August 1956, the seventh YF-104A [55-2961] was transferred to NACA (later reorganized as NASA). It was initially numbered , but later renumbered with the civil registration [N818NA] (the "NA" standing for NASA). This plane was used by NASA for various test flight purposes until it was finally retired in November 1975, and is now on display at NASM.
In October 1957, NASA acquired two ex-USAF F-104A single seaters [56-0734, 56-0749] for use in flight testing; [56-0749] crashed in 1962. So far as I am aware, those planes were never assigned NASA s/ns. In December 1959, F-104B [57-1303] was transferred to NASA and assigned the NASA number of . It served until 1978, when it was finally retired.
Between August and October 1963, Lockheed delivered three single-seat F-104G Starfighters to NASA, being designated F-104N (N for NASA) and were to serve as high-speed chase aircraft. Those three were the only purpose-built Starfighters produced by Lockheed for NASAall other Starfighters operated by NASA were transferred from the USAF. Those F-104Ns were initially numbered [011/013].  was lost on June 8, 1966, when it was involved in a mid-air collision with the second North American XB-70A Valkyrie during a General Electric-sponsored publicity photographic flight. The pilot of the F-104N, Joseph A Walker, was killed. The XB-70A pilot, Alvin S White, ejected with injuries, but his copilot, Maj Carl S Cross, went down with the Valkyrie and was killed. The two surviving F-104Ns were later given the civilian registrations [N811NA] and [N812NA]. The former is in open storage for the USAF Flight Test Museum at Edwards AFB.
In December 1966, NASA acquired another ex-USAF F-104A [56-0790] as a replacement for [N813NA]. It was assigned the number [N820NA], and was withdrawn from use on October 30, 1983, and is now on display at the Smithsonian. NASA's rare F-104B [N819NA < 57-1303] went from the USAF Museum at Dayton into the McClellan Aviation AFB Musem (now Aerospace Museum of CA) collection of aircraft in the early '80s.
Later, NASA also received some additional F/TF-104Gs from military sources. In 1975, NASA received two tandem-seat TF-104Gs and one single-seat F-104G, giving them civil numbers [N824NA/826NA], respectively. [N824NA] and [N825NA] were ex-Luftwaffe TF-104G two-seaters (bearing USAF s/ns [61-3065] and [66-13628]), whereas [N826NA] was originally a Fokker-built single-seat RF-104G for the Luftwaffe, but which had been serving with the Luftwaffe training unit at Luke AFB in Arizona (original German s/n was [KG200]). After removal of their military equipment, they were used by NASA for various flight test purposes.
 was retired in 1985 after 1,127 flights, then loaned to California Polytechnic College in 1995, and in turn to the Estrella Warbird Museum in March 2000.  and  were retained by Ames/Dryden Flight Research Facility at Edwards AFB in California, where they are currently being used for various NASA-related flight test programs, and are the only Starfighters still flying in US service.
Thanks to Mary Shafer for her report on the status of the NASA F-104Gs. ( Joe Baugher 12/13/99)