Postsynaptic density protein 95 (PSD95) and synapse-associated protein 97 (SAP97) are homologous scaffold proteins with different N-terminal domains, possessing either a palmitoylation site (PSD95) or an L27 domain (SAP97). Here, we measured PSD95 and SAP97 conformation in vitro and in postsynaptic densities (PSDs) using FRET and EM, and examined how conformation regulated interactions with AMPA-type and NMDA-type glutamate receptors (AMPARs/NMDARs). Palmitoylation of PSD95 changed its conformation from a compact to an extended configuration. PSD95 associated with AMPARs (via transmembrane AMPAR regulatory protein subunits) or NMDARs [via glutamate ionotropic receptor NMDA-type subunit 2B (GluN2B) subunits] only in its palmitoylated and extended conformation. In contrast, in its extended conformation, SAP97 associates with NMDARs, but not with AMPARs. Within PSDs, PSD95 and SAP97 were largely in the extended conformation, but had different orientations. PSD95 oriented perpendicular to the PSD membrane, with its palmitoylated, N-terminal domain at the membrane. SAP97 oriented parallel to the PSD membrane, likely as a dimer through interactions of its N-terminal L27 domain. Changing PSD95 palmitoylation in PSDs altered PSD95 and AMPAR levels but did not affect NMDAR levels. These results indicate that in PSDs, PSD95 palmitoylation, conformation, and its interactions are dynamic when associated with AMPARs and more stable when associated with NMDARs. Altogether, our results are consistent with differential regulation of PSD95 palmitoylation in PSDs resulting from the clustering of palmitoylating and depalmitoylating enzymes into AMPAR nanodomains segregated away from NMDAR nanodomains.