Skip to content
universalCase Converter

Blog

Capitalizing Names and Surnames: McDonald, O'Brien, van der Berg

Names are the hardest text to capitalize automatically. Rules differ between cultures, and many people write their name in a deliberate way.

By the Universal Case Converter Team

Why names break simple rules

A rule that capitalizes the first letter of every word and lowercases the rest works for ordinary words. It fails for names. McDonald becomes Mcdonald, O'Brien can become O'brien, and van der Berg becomes Van Der Berg. These results are wrong for the people who bear the names, and a mistake in someone's name is more noticeable than a mistake in an ordinary word.

The underlying reason is that the capitalization of a name is part of its identity and not a grammar rule. Names come from many cultures, each with its own tradition, and they have been changed by migration, record keeping and personal choice. No algorithm can know that this particular person writes their name with a capital letter inside it.

Prefixes: Mc, Mac, O' and D'

Scottish and Irish names often have an internal capital: McDonald, McKenzie, O'Connor, O'Brien. The prefix Mc and the O' are usually followed by a capital letter. The prefix Mac is more complicated. MacDonald and Macdonald are both in use, and some names that start with Mac, such as Mack or Macy, are not prefixed names at all. A tool cannot tell which is which without a list.

Italian and French names with the particle D', such as D'Angelo, usually capitalize the letter after the apostrophe too. Python's built-in title() method, for instance, handles O'Brien correctly by accident, because it capitalizes after any non-letter, but it also turns they're into They'Re, which is why programmers avoid it for ordinary text.

Particles: van, von, de, della

Particles such as van, von, de, du, della, di and bin are lowercase in many names when they follow a first name: Ludwig van Beethoven, Charles de Gaulle, Leonardo da Vinci. When the surname comes first, or when the first name is omitted, practice differs. In Dutch, a particle that stands at the start of a sentence or comes without a first name is capitalized: Van Gogh painted it, but Vincent van Gogh painted it. In German, von stays lowercase in the middle of a sentence and is capitalized at the start.

Spanish and Portuguese surnames often contain de, del, de la or dos in lowercase between names: María de la Cruz. Here too, the first letter of the surname is capitalized at the beginning of a sentence. Because the practice varies by language, by country and by the preference of the family, a general tool cannot decide, and an editor must check.

Hyphens, apostrophes and compound names

Double-barrelled names and first names connected with a hyphen usually capitalize both parts: Anne-Marie, Jean-Pierre, Smith-Jones. Most converters do this correctly when they treat the hyphen as a word boundary, and the converter on this page does so too. Names in which the second part is a particle, such as Jean-de-la-Fontaine, are less predictable.

Names with an apostrophe are handled differently in different languages. In English and Irish names, the letter after the apostrophe is often capitalized (O'Neill). In French and Italian, the elided article l' or d' before a word is often lowercase when it is part of a common word, but a surname can follow another rule. The reliable strategy is to leave the name as the person wrote it.

Names written in lowercase by choice

Some people deliberately write their names in lowercase or with unusual capitals: the writer bell hooks, the singer k.d. lang, the poet e. e. cummings in some of his publications. Brand-like names such as iPhone and eBay behave similarly. A tool that converts to Title Case destroys such choices.

The same goes for the names of organizations, which are often written with their own capitals: PayPal, YouTube, adidas. If a style guide says to respect the style of the owner, you must check each of these by hand.

Dutch and other special rules

Some languages have capitalization rules that differ from English in a way that matters for names. In Dutch, the digraph ij is treated as one letter, so a name that begins with it is written with both letters in capitals: IJsselmeer, IJmuiden. A simple tool that capitalizes only the first letter would give Ijsselmeer. The converter on this page applies the Dutch rule when the page language is Dutch.

In Turkish, the dotted and dotless i have separate capitals, so İstanbul begins with a capital dotted İ, while a simple conversion would produce Istanbul. German names with ß, such as Strauß, can be written with SS in capitals, so STRAUSS is acceptable in a document in capitals.

Best practices for names in data

If you maintain a database of names, store names as the person entered them and do not convert them automatically. If you must display them in a consistent form, for example in a mailing, use a gentle rule: capitalize a name only when it is entered all in lowercase or all in capitals, and leave mixed-case names alone. This single rule prevents most of the damage.

Do not assume that every person has a first name and a last name, or that names fit a fixed format. A well-known essay on the subject lists many false assumptions that programmers make about names. When the text matters, a human should check it. The converter is a good start for a list of plain names, but check the result for prefixes, particles and personal spelling.

Convert a list of names to the right case with the free case converter, then check prefixes by hand.

Open the case converter