Standard Spanish, also called the , refers to the standard, or codified, variety of the Spanish language, which most writing and formal speech in Spanish tends to reflect. This standard, like other standard languages, tends to reflect the norms of upper-class, educated speech. There is variation within this standard such that one may speak of the Mexican, Latin American, Peninsular (or European), and Rioplatense standards, in addition to the standard forms developed by international organizations and multinational companies.

Development Medieval period According to Ramón Menéndez Pidal's thesis, the dialect that would become standard Spanish originated in the speech of medieval Burgos and surrounding areas. The traits of Burgos speech began to extend beyond its immediate area due to the military success of the Kingdom of Castile. Crucially, speakers of the Burgos dialect were involved in the 1085 capture of Toledo, which was the traditional old capital of a united peninsular kingdom in the Visigothic era. In the ensuing dialect mix, characteristics of Burgos speech became more favored in upper-class Toledan speech than those native to Toledo or those brought by other settlers. Thus, post-reconquest Toledan speech was characterized by a large number of features from Burgos. This city became the main center of the kingdom and the Christian Primate see, giving its local dialect a privileged position.

The standardization of Spanish required its use in a large number of domains, traditionally reserved for Latin, and that required speakers to become conscious of Spanish as a separate linguistic code from Latin. The introduction of new ways of writing Romance from France, resulting in spelling systems which sought to represent the phonemes of the local Romance dialect, led to such a linguistic consciousness. This new spelling was used inconsistently at first, but became used with increasing sophistication by the early 13th century. In particular, finding a way to represent Romance's sibilant and palatal consonants in this new system was quite difficult, because Latin had no palatals and only one sibilant, , and so the representation of these phonemes was very inconsistent at first.

The first major steps toward standardization of Castilian were taken in the 13th century by King Alfonso X of Castile (Alfonso, the Wise), who assembled scribes and translators at his main court in Toledo. The king supervised a vast number of writings and even wrote some documents himself. These included extensive works on history, astronomy, law, and other fields of knowledge, either composed originally or translated from Islamic sources. This huge amount of writing based out of Toledo, in fields previously reserved for Latin, had a standardizing effect on written Romance in the area. It also led to a massive expansion of Castilian's vocabulary, mainly achieved through borrowing, but also through derivation, especially through the use of suffixes. The syntax of written Spanish also became a lot more elaborate, with a greater number of subordinate clauses, and fewer clauses connected with 'and'. Additionally, the orthography, which had been quite chaotic at the beginning of Alfonso X's reign in the mid-13th century, became systematized, although it was not entirely free of variation.

Alfonso X's promotion of writing in Castilian was likely intended in part to have a unifying effect on his kingdom. Each of the three more well-established written languages, Latin, Hebrew and Arabic, was associated with a particular religious community, while Castilian or a closely related dialect was spoken by nearly everyone.

Renaissance and Golden Age The first grammar of Castilian, and the first explicit codification of any modern European language, was published in 1492 by Antonio de Nebrija. Further commentary on the language was offered by Juan de Valdés in 1535. At around the same time, early printers also played a strong standardizing role. Nebrija notably described the Spanish language he sought to codify as a companion of empire in his address to Queen Isabella, at the time referring to Spain's possessions in Europe and not to Spain's soon-to-be-conquered possessions in the Americas.

After the settling of the Royal Court at Madrid, and subsequent dialect mixing and the establishment of new varieties spoken in Madrid, standard written Spanish became primarily based on the speech of Madrid, even though its origin is sometimes popularly assigned to other cities, such as Valladolid.: "Whatever might be claimed by other centres, such as Valladolid, it was educated varieties of Madrid Spanish that were mostly regularly reflected in the written standard".

The Early Modern Spanish of the 16th and 17th centuries is sometimes called classical or Golden Age Spanish, referring to the literary accomplishments of that period. Spanish orthography was still far from consistent during this time. The gap between the largely unchanged system developed under Alfonso X and spoken Spanish expanded due to changes such as the evolution of sibilants and the loss of , which occurred during this time, and betacism, or the merger of the phonemes and , which had become complete in northern Spain by the fifteenth century.

One notable case of grammatical variation in Spanish has to do with third-person object pronouns. Much of northern Spain, as well as Andalusia and Latin America, uniformly uses an etymological, case-based system in which retain their accusative value, while is only used for indirect objects. That said, there is competition between that system and others in much of Spain. These other systems are either the purely semantic system, in which is reserved for non-countable objects, while refer to countable objects, and there is no marking for case, as found in the traditional speech of much of northwestern Castile, eastern Cantabria and part of the western Basque Country, or hybrid systems in-between the two extremes. One such hybrid system, largely identical to the semantic system but with a gender distinction for non-countable objects (as in, 'this milk has to be thrown out', where the purely semantic system would use ), was dominant in the written Spanish of Golden Age Castile.

A number of phonetic features which have since become restricted to nonstandard speech were frequently represented in writing during the Spanish Golden Age. For example, the handling of syllable-final labial and velar consonants in a number of Latinate words, such as 'concept' and 'absolve' was highly variable during this period. Typically, these forms alternated between forms with and without the coda consonant, such as 'accident'. There were also cases of labials becoming u, as in 'concept' or 'captive', and interchanges of and , as in 'correct'. These labial and velar consonants have been preserved in most words in the modern standard, while rural, nonstandard varieties typically prohibit syllable-final labial and velar consonants. Likewise, there was a frequent interchange between non-stressed and and between non-stressed and , as in much modern nonstandard Spanish. That said, a preference for the now-standard forms was beginning to form, as Juan de Valdés recommends forms like 'vanity/cover' over their competitors .

Modern era In 1713, with the foundation of the Royal Spanish Academy, part of the Academy's explicit purpose was the normalization of the language, "to fix the words and expressions of the Castilian language with the greatest possible propriety, elegance and purity"."fijar las voces y vocablos de la lengua castellana en su mayor propiedad, elegancia y pureza" Throughout the 18th century the Academy developed means of standardization. Between 1726 and 1793 it published a "dictionary of the Castilian language, in which the true sense of the words is explained, as well as their nature and quality, along with the phrases and forms of speech, and the proverbs, sayings, and other matters pertinent to the use of the language"."Diccionario de la lengua castellana, en que se explica el verdadero sentido de las voces, su naturaleza y calidad, con las frases o motivos de hablar, los proverbios o refranes y otras cosas convenientes del uso de la lengua" In 1771 a Grammar of the Spanish Language was published.Gramática de la lengua española

One area of the language the Academy sought to fix was its orthography. Because of the growing distance between spelling and pronunciation, a concern for spelling reform had developed in the 17th century. This culminated in the 1741 publishing of the Academy's Orthography of the Spanish Language.Ortografía de la lengua española Between then and 1815, the Academy carried out a significant number of spelling reforms, until Spanish orthography essentially reached its modern form. In the case of coda labial and velar consonants, the Academy typically ruled in favor of variants, like , which maintained those consonants. That said, in some cases, like 'subject', the simpler form prevailed, in other cases both forms survive with slightly different uses, like 'respect'. In some cases with the prefixes, like 'dark', variation persists, although the simpler forms appear certain to prevail. When coda velar or labial consonants followed a nasal consonant, as in 'soon', the middle velar or labial was simply dropped.

In the 19th century, as the various republics of Latin America became independent, the use of Spanish was connected to nationhood, and numerous constitutions recognized Spanish as the official language of their respective countries. The Spanish language words used in the Latin American countries began to be recorded in dictionaries as "Americanisms", beginning in the 19th century.

There is still some variation, especially lexical and phonological, in the current standard, and forms of address differ between different countries, with the informal second-person plural predominantly being used in Spain, and being used in much of Latin America. As mentioned above, there is still significant variation in the use of third-person clitic pronouns. While Latin America uniformly uses the etymological system inherited from southern Spain, there is much competition between that system and others in the written language of much of the rest of Spain. One hybrid system, which is mostly case-based except that can also refer to masculine human direct object referents, has become dominant in Spain today, although it only made it into prescriptive grammars in the 20th century. Uses which deviate from the etymological system are labelled , or the use of for a direct object, and , refers to the use of for an indirect object.

Following a period of concern over the unity of the language, Latin American Spanish began to be taken into account in designing prescriptive grammars and dictionaries, from the mid-20th century onwards.

The relationship between standard and nonstandard varieties The phrase "dialects of Spanish" often leads to the misunderstanding that a previously uniform Spanish has split into several divergent varieties, and that nonstandard varieties are derivatives, or debasements, of standard Spanish. This is historically backwards because language has always existed in a state of variation, and standard languages are historically derived from local dialects, not the other way around. Additionally, the standardization of Spanish has led to a reduction in the amount of variation reflected in writing.