Den här artikeln är ännu inte översatt till Svenska — du läser originalet på English. Finns även på:Deutsch, English, Українська
Spain's Statistical Office Strips Accents From Names on Purpose
If you have ever wondered why so many databases think Spaniards are called Jose, Angel and Maria, the proof fits on one screen.
We downloaded the two name files that Spain's Instituto Nacional de Estadística (INE) publishes — Nombres por fecha de nacimiento and Nombres más frecuentes — and counted raw byte sequences inside them:
| Byte sequence | nombres_por_fecha.xls | nombres_mas_frecuentes.xls |
|---|---|---|
MARIA | 73 | 57 |
MARÍA | 0 | 0 |
JOSE | 23 | 30 |
JOSÉ | 0 | 0 |
JESUS | 7 | 5 |
JESÚS | 0 | 0 |
ANGEL | 9 | 7 |
ÁNGEL | 0 | 0 |
ADRIAN | 2 | 2 |
ADRIÁN | 0 | 0 |
Not one acute accent, in either file, on any given name. María is the most common female name in Spain and it does not appear once in its correct spelling in Spain's own official name statistics.
The obvious explanation is that something in the pipeline lost the high bytes — a CP1252 file read as ASCII, a legacy export, an old tool. That explanation is wrong, and the same two files disprove it.
The control that rules out encoding
Province names live in those same files, in the same byte stream, written by the same export:
| Byte sequence | nombres_por_fecha.xls | nombres_mas_frecuentes.xls |
|---|---|---|
ALMERIA | 0 | 0 |
ALMERÍA | 1 | 1 |
JAEN | 0 | 0 |
JAÉN | 1 | 1 |
MALAGA | 0 | 0 |
MÁLAGA | 1 | 1 |
CORDOBA | 0 | 0 |
CÓRDOBA | 1 | 1 |
CASTELLÓN | 1 | 1 |
LEÓN | 1 | 1 |
The acute-accented bytes are physically present in the file. Í (0xCD), Á (0xC1), É (0xC9), Ó (0xD3) all appear — just never in a name.
And there is a second, sharper control, because it lives inside the name field itself:
| Byte sequence | nombres_por_fecha.xls | nombres_mas_frecuentes.xls |
|---|---|---|
INAKI | 0 | 0 |
IÑAKI | 1 | 1 |
BEGOÑA | 2 | 2 |
CORUÑA | 2 | 2 |
ESPAÑA | present | present |
Ñ (0xD1) survives in the name column. The Basque name Iñaki keeps its tilde; a hypothetical INAKI does not exist in either file. So the transformation is not "strip non-ASCII from names", and it is not "strip non-ASCII from the file". It is: remove the acute accent, in the name field, and leave everything else alone.
That is not a bug. A bug does not distinguish Ñ from Í. That is a rule someone wrote down.
INE's methodological documentation for these products describes a cleaning and standardisation step applied to names in order to make them comparable across sources and years — which is a perfectly reasonable statistical objective, and which is exactly what produces this. From INE's point of view, MARIA and MARÍA are two spellings of one name and collapsing them prevents a single name from appearing twice in a frequency ranking. From the point of view of anyone who downloads the file, one third of Spain's names arrive misspelled.
Source and licence note. Both files are published by the Instituto Nacional de Estadística at ine.es and reused here under INE's terms, which require naming the source. This page names it. All counts above are our own measurements against the downloaded files, taken on 21 July 2026.
How much of Spain this affects
It is not a tail problem. Measured on our own Spanish given-name corpus, which is built on INE's frequency data and carries the registry's own birth counts as weights:
| File | Entries | Total weight | Entries carrying an acute | Share of weight |
|---|---|---|---|---|
firstname_male | 10,961 | 17,832,848 | 2,789 | 31.58% |
firstname_female | 12,516 | 17,980,967 | 2,780 | 37.84% |
| Combined | 23,477 | 35,813,815 | 5,569 | 34.79% |
Roughly one Spaniard in three has an acute accent in their given name. In the raw INE files, that share is zero.
The surname side is worse, not better: our Spanish surname corpus carries 2,522 entries and 34,026,331 registry bearers, of which 716 entries — 43.4% of the weight — carry an acute. García, Pérez, Sánchez, Rodríguez, Fernández, González, Martínez, Gómez, Díaz, Álvarez. INE's surname file has none of them accented either; we measured GARCIA 537 / GARCÍA 0 and PEREZ 248 / PÉREZ 0.
So when a dataset is described as "built on official Spanish statistics", the accurate reading is: the head of that dataset is misspelled, and the misspelling is inherited, not introduced. This is the actual mechanism behind the millions of records worldwide in which a Spaniard is called Jose.
Recovering the accents, and what each method actually scores
We had to solve this for our own corpus, so we measured the options instead of arguing about them.
The test set. Before the INE rebuild, our Spanish given-name list was a small hand-curated file: 771 names (396 male, 378 female), of which 155 — 20.1% — carry a diacritic, correctly. That file predates the INE import and shares no rows with it, so it is a genuine held-out set. The test: strip its accents to simulate INE output, ask each method to put them back, compare character for character against the original.
| Method | Fires on | Correct when it fires | Breaks correctly-plain names |
|---|---|---|---|
| Leave it as INE published it | 0% | — | 0 (but 20.1% stay wrong) |
Rule: -an → -án, -in → -ín, -on → -ón | 7.0% | 57.41% | 19 |
Token lexicon from es_AR + es_PE + es_VE | 17.6% | 99.26% | 1 |
The same lexicon plus pt_PT / pt_BR | 18.2% | 97.14% | 4 |
Rule: -cion → -ción, -sion → -sión | 1.2% | 100% per token | 0 |
All five rows were recomputed from scratch for this page on 21 July 2026 against the corpus as shipped today.
Why the obvious rule is the worst one
Spanish stress rules make the suffix rule look inevitable. A word ending in -n is stressed on the last syllable only if it carries a written accent, so -ón, -án, -ín endings are extremely common: Ramón, Julián, Joaquín, Adrián, Sebastián, Antón.
On surnames that rule is close to perfect. On given names it scores 57.41% — worse than a coin flip on some readings — and here is the entire reason:
Juan Esteban Joan Ferran Cristian Jonathan Kevin Jon
Every one of those is a genuine Spanish (or Catalan, or imported) given name that is paroxytone — stressed on the penultimate syllable — and therefore correctly written with no accent at all. The rule turns them into Juán, Estebán, Joán, Ferrán, Cristián, Jonathán, Kevín, Jón.
Of the 23 names the rule got wrong in our test, 11 were the Juan family: Juan, Juan Carlos, Juan Antonio, Juan Manuel, Juan José, Juan Francisco, Juan Luis, Juan Pablo, Juan Miguel, Juan Pedro, Juan Ignacio, Juan Ramón, Juan Bautista. Juan is one of the ten most common male names in Spain. A rule that is 57% accurate but concentrates its errors on the single most common name it touches is not 57% useful — it is a rule that visibly breaks the front page of your data.
The -ción / -sión rule is the opposite case and worth keeping: in Spanish, every word ending in -ción or -sión is stressed on the final syllable, without exception, and the Marian devotional names built on that pattern (Concepción, Encarnación, Asunción, Purificación, Ascensión, Consolación, Resurrección) are common enough in Spain to matter. It fired on 8 distinct tokens in the test set and got 8 right. Its name-level score reads below 100% for a measurement reason rather than a rule failure: in Maria Concepcion the rule correctly produced Concepción but could not fix Maria, so the full string still did not match.
Why borrowing from neighbours works
The method that actually scores is dull: take the accented spellings from other Spanish-speaking locales — Argentina, Peru, Venezuela — index them by their accent-stripped, lowercase form, and use the heaviest spelling as the answer for the matching Spanish token.
It works because those registries publish accents. The names are the same names. José in Lima is spelled the same as José in Seville, and nobody stripped it on the way out.
It fires on 17.6% of the test set and is right 99.26% of the time. Its single error is instructive: Telesforo → Telésforo. The Venezuelan corpus prefers the esdrújula spelling, Spain does not, and one lexicon cannot know that. One error in 136 is the price.
Adding Portuguese looks like free coverage and is not. Coverage rises from 17.6% to 18.2% and precision falls from 99.26% to 97.14%, because Portuguese and Spanish diverge on exactly the names that are otherwise identical: António vs Antonio, Olívia vs Olivia, Aurélia vs Aurelia, Custódia vs Custodia. A neighbouring language is a good source only where the two orthographies agree, and there is no cheap way to know where they do.
Going online does not save you: Wikidata has the same defect
The natural next move is "just look the name up". We tested that against Wikidata, which is the largest openly queryable store of name items, by pulling the Spanish-language labels of items typed as family names.
| Measurement | Value |
|---|---|
Distinct es labels retrieved for family-name items | 25,219 |
| Labels containing an acute accent | 820 (3.25%) |
| Accented surnames in our Spanish corpus with a match in that label set | 128 |
| — present with the correct accented spelling only | 69 |
| — present as both spellings, as two separate items | 10 |
| — present only in the accent-stripped form | 49 (38.3%) |
Nearly two in five accented Spanish surnames that Wikidata knows about are there only in the wrong spelling:
| Correct | What Wikidata has | Bearers in our corpus |
|---|---|---|
Marín | Marin | 108,047 |
Cortés | Cortes | 89,974 |
Durán | Duran | 55,665 |
Macías | Macias | 35,103 |
Bermúdez | Bermudez | 31,685 |
Simón | Simon | 25,966 |
Vélez | Velez | 16,350 |
Nicolás | Nicolas | 14,291 |
Falcón | Falcon | 13,444 |
Ángel | Angel | 5,069 |
And this is the part that makes it unusable as a corrector rather than merely incomplete: García, Pérez, Rodríguez, González, Sánchez, Gómez, Muñoz, Álvarez and Velázquez are all correctly accented in the same label set. Wikidata is not uniformly stripped — it is inconsistent, item by item, because each item was created by a different contributor importing from a different source. Martin and Martín both exist as separate labels; so do Diaz and Díaz.
A uniformly corrupted source can be repaired with one transformation. An inconsistently corrupted source cannot be repaired at all without a second source to arbitrate, and if you had that second source you would not need the first. "Check it against the internet" is not a plan; it is a way of importing someone else's unlabelled error rate.
What we changed, and what we deliberately did not
We restored the accents in the Spanish given-name corpus using the lexicon plus the -ción rule plus a small number of manually justified head corrections, and applied the identical change to the per-decade cohort files, because the generator reads the cohort file first and leaving the two inconsistent would have been worse than doing nothing.
The invariants held: entry count unchanged (10,961 male, 12,516 female), total weight unchanged to the unit (17,832,848 and 17,980,967), zero merges, zero rows added or lost. Only the spelling of column 0 moved.
The head of the corpus now reads as Spain writes it:
| Rank ♂ | Name | Weight | Rank ♀ | Name | Weight |
|---|---|---|---|---|---|
| 1 | Antonio | 535,025 | 1 | María Carmen | 590,285 |
| 2 | Manuel | 457,733 | 2 | María | 426,801 |
| 3 | José | 426,358 | 3 | Ana María | 253,971 |
| 4 | Francisco | 386,218 | 4 | Carmen | 252,824 |
| 5 | David | 333,495 | 5 | María Pilar | 236,763 |
What we left alone is the more interesting half.
Alex — 30,577 weight — is untouched, because Castilian writes Álex and Catalan writes Àlex, two different accents on the same string, and the registry carries no language marker to choose between them. Nuria (118,896) is untouched for the same reason: Catalan Núria, Castilian Nuria. Desiree (11,370) has three plausible spellings and no evidence.
The largest single unresolvable case is Maria itself. Catalan spells it without an accent; Castilian spells it María. INE merged them into one row long before we saw the file. We chose the Castilian reading because it dominates numerically, which means that a share of Catalan and Balearic bearers get a spelling that is wrong for them. We cannot fix this and we are not going to pretend the number is smaller than it is.
We also blocked the method from firing inside foreign-looking compounds. Left as INE published them: Gheorghe Adrian, Ionut Valentin, Vasile Adrian, Fatima Zahra, Martin John, Simon Peter. A Romanian Adrian is not a Spanish Adrián, and Spain's registry contains a great many Romanian, Moroccan and Latin American names. The residual Jose weight still sitting unaccented in our file — 1,115 — is almost entirely this category, and we consider that correct.
An automatic version of that guard failed, and the failure is worth recording: "block if the token appears in a non-Spanish corpus and not in a Spanish one" produced 817 cancellations, wrongly including Aránzazu, África, Mercè and Eloísa — because our English and French corpora are themselves full of Spanish names, having been built from censuses of countries with large Hispanic populations. There was no automatic separation available, so the guard is a hand-written list of foreign markers, and we say so rather than dress it up.
What to do with this
Never treat a national statistics office as an orthography source. It is an authority on counts. Its name field has been through a cleaning step designed to make counts comparable, and orthographic fidelity is not one of the objectives of that step. This is not specific to Spain — it is what a normalisation step is for.
Test the encoding hypothesis before you accept it. Two greps settle it. Does the file contain accented bytes anywhere? Does the name field preserve any non-ASCII character at all? If the answer to both is yes, you are looking at an editorial rule, not mojibake, and no amount of iconv will help.
Do not restore accents with a stress rule. Spanish stress rules describe how to write a word you already know; they do not tell you which word you are looking at. Juan and Julián differ in nothing a regular expression can see.
Use another registry of the same language, and measure it. Every method in this page took under an hour to evaluate against a held-out set, and the ranking was not the one we expected before measuring. The gap between 57% and 99% is not a matter of taste.
Store the language as well as the name. Maria and María are both correct; which one is correct for a given person depends on a fact the name string does not carry. If your data model has nowhere to put that fact, you will keep re-deriving it, badly, forever.
Say which spelling you shipped. Our corpus now deviates from INE's published form in 5,569 entries. Anyone reconciling our file against the source will see the difference, and they should be able to look up why rather than assume corruption.
Known limitations
- The restoration is 18% coverage, not 100%. The method deliberately stays silent on roughly 9,500 tokens it does not recognise —
Mohamed,Youssef,Mihaela,Aitor,Mikel,Josep,Jordi. Most of those are correctly unaccented; some are not. Silence where there is no evidence is the design, not an oversight. Mariain Catalan is wrong in our file, by choice. So areAlex,NuriaandEulaliafor a minority of bearers, by refusing to choose.- We measured Wikidata once, from one query. Wikidata changes daily and our figure is a snapshot, not a standing claim about the project.
- Our accent-bearing weight share (34.79%) counts entries carrying an acute or grave, not entries we changed. Some of those spellings were always there —
Iñaki,Begoña,Llorenç— and were explicitly protected from the fixer. - We have not verified INE's stated intent, only its output. The byte counts prove the transformation is field-scoped and deliberate. They do not prove why.
Data as of 2026-07-21
INE files downloaded and byte-counted on 21 July 2026. Corpus figures recomputed from the shipped weight files the same day: es_ES given names 10,961 ♂ / 12,516 ♀ carrying 17,832,848 / 17,980,967 registry births; surnames 2,522 entries carrying 34,026,331 bearers. Elaboración propia con datos extraídos del sitio web del INE: www.ine.es.