A naming law restricts the names that parents can legally give to their children, usually to protect the child from being given an offensive or embarrassing name. Many countries around the world have such laws, with most governing the meaning of the name, while some only govern the scripts in which it is written.

Australia
In Australia, naming laws are governed by the States and Territories which may have differing restrictions. Most states prohibit names that are too long, include unpronounceable symbols such as !, @ or # (apart from hyphens between names), that include official titles or are otherwise obscene or offensive. In 2017 a list of purportedly prohibited names was leaked from the Victorian register of Births, Deaths and Marriages some examples of which are below:

 Anzac
 Australia
 Chief
 Christ
 Commodore
 Constable
 Emperor
 General
 God
 Judge
 Justice
 King
 Lady
 Messiah
 Minister
 Prime Minister
 Saint
 Satan
 Seaman

Some examples of names banned nationally are:

 Admiral
 Anzac
 Australia
 Baron
 Bishop
 Bonghead
 Brigadier
 Brother
 Cadet
 Captain
 Chief
 Chow Tow
 Christ
 Commodore
 Constable
 Corporal
 Cyanide
 Dame
 Dickhead
 Duke
 Emperor
 Father
 G-Bang
 General
 God
 Honour
 Ikea
 iMac
 Judge
 Justice
 King
 Lady
 Lieutenant
 Lord
 Madam
 Majesty
 Major
 Marijuana
 Medicare
 Messiah
 Minister
 Mister
 Monkey
 Ned Kelly
 Nutella
 Officer
 Panties
 Premier
 President
 Prime Minister
 Prince
 Princess
 Queen
 Ranga
 Robocop
 Saint
 Satan
 Scrotum
 Seaman
 Sergeant
 Shithead
 Sir
 Sister
 Smelly
 Snort
 Thong
 Virgin

Azerbaijan
Over 200 names have been proscribed by Azerbaijan as of 2015, including "the names of persons who have perpetrated aggression against the people of Azerbaijan" (including names seen as "Armenian") and "names whose meaning is offensive in the Azerbaijani language".

Canada
Naming laws vary from province to province.  In British Columbia, the Vital Statistics Act requires the registrar general to reject a proposed name or an amendment to an existing name if the name "might reasonably be expected to cause (i) mistake or confusion, or embarrassment to the child or another person, is sought for an improper purpose, or is, on any other ground, objectionable".

China

In Imperial China, a naming taboo prevented people from using the same names as the reigning emperor.

Denmark
Under the Law on Personal Names, first names are picked from a list of approved names (18,000 female names and 15,000 male names as of 1 January 2016). One can also apply to Ankestyrelsen for approval of new names, e.g. common first names from other countries. Names cannot have surname character, and must follow Danish orthography (e.g. Cammmilla with three ms is not allowed).

 Finland 

The Names Act of 1985 requires that all Finnish citizens and residents have at least one and at the most four first names. Persons who do not have a first name are obligated to adopt one when they are entered into the Finnish national population database. Parents of new-born children must name their child and inform the population registry within two months of the child's birth. The name may be chosen freely, but it must not be

 a name used primarily by persons of the other sex
 a name foreign to the naming tradition in Finland
 a surname, except a patronymic as last given name
 a name already used by a sibling, if this is to be the only given name.

Waivers may be granted if valid family, religious or ethnic reasons give grounds to use a name contrary to these principles. Persons may change their first names once without a specific reason. For subsequent changes, valid reasons must be presented.

France
Since 1993 the choice has been free in France unless it is decided that the name is contrary to the interests of the child. Before that time the choice of first names was dictated by French laws that decreed which names were acceptable. Napoleon Bonaparte created the law.

Germany
Names have to be approved by the local registration office, called Standesamt, which generally consults a list of first names and foreign embassies for foreign names. The name cannot be a last name or a product, and it cannot negatively affect the child. If the name submitted is denied, it can be appealed; otherwise a new name has to be submitted. A fee is charged for each submission.

Umlauts (ä, ö, ü) and/or the letter ß''' in family names are recognized as an important reason for a name change. (Even just the change of the spelling, e.g. from Müller to Mueller or from Weiß to Weiss, is regarded as name change. In German ID cards and passports, however, such names are spelled in two different ways: the correct way in the non-machine-readable zone of the document [Müller] and transcribed [Mueller] in the machine-readable zone of the document, so persons unfamiliar with German orthography may get the impression that the document is a forgery. German credit cards may use the correct or the transcribed spelling only. It is recommended to use the exactly same spelling in the machine-readable zone of the passport for airline tickets, visas, etc. and to refer to this zone if being asked questions.) Internationally and by many electronic systems, ä / ö / ü are transcribed as ae / oe / ue, and ß is transcribed as ss''.

During the Nazi period, Germany had a list of approved names to choose from that was passed on 5 January 1938 as the "Second Regulation under the law re The changing of Family and Given names." The law had one list of names for ethnic Germans and another for Jews.

Hungary
A child's name must be chosen from a list of pre-approved names. If the intended name is not on the list, the parents need to apply for approval. Applications are considered by the Research Institute for Linguistics of the Hungarian Academy of Sciences following a set of principles.
Children born to a foreign citizen may have their name chosen according to foreign law.

Iceland

Parents are limited to choosing children's names from the Personal Names Register, which as of 2013 approved 1800 names for each gender. Since 2019 given names are no longer restricted by gender.
The Icelandic Naming Committee maintains the list and hears requests for exceptions.

Iran

No anti Islamic or perverted names are permitted. 
No names meant for opposing sex.
Those converting to Islam are allowed to change their name.
Abd can be deleted because it's a god's attribute.
All names are pre approved.

Israel
According to a law from 1956, a person should have a first name (more than one is permitted) and surname (a double-barrelled name is permitted). Children receive the surname of their married parents or the surname of their father if the surnames of their parents differ one from another. If their parents were not married or have a common-law marriage, children receive the surname of their mother unless both parents agreed to give them a double surname. Names can be double if there was no agreement about it between both parents who at least have a common-law marriage. If the parents do not have a common-law marriage children receive the surname of their mother only.

It is permitted to change one's name or surname once in seven years, or even earlier provided the Ministry of Interior agrees. The Ministry may reject a name or surname if the possibility exists that the name is deceptive or that may be an offence to public policy and the public sentiment.

In the case of adoption a child receives the adoptive parents' surname but keeps the original first name.

In a case of person with no name, the Minister of Interior chooses the name in accordance with names of person's parents, grandparents, or the spouse in the case of marriage. However, the person can change this name within two months of the announcement.

The father's name is provided by the mother of the person until the age of 16, or by the individuals themselves if they are above age 16.

Italy
Names considered ridiculous or shameful are banned by law.

Japan

Similar to China, Japan has a certain set of characters that cannot be used in a child's name.

Kyrgyzstan

Some Kyrgyz have been Russifying their names.

A law to ban Russified names was proposed.

Malaysia
On and after 2006, the National Registration Department of Malaysia (JPN) may decline to register objectionable or undesirable names, including names based on titles, numbers, colors, vegetables, fruits, vulgarities, and equipment. Parents who wish to register such names despite JPN objection must make a statutory declaration to that effect.

Namibia
In 2014, Deputy Foreign Affairs Minister Peya Mushelenga proposed banning offensive baby names such as "Shame on you" and "Ndalipo" ().

New Zealand
Under the Births, Deaths and Marriages Registration Act of 1995, names are prohibited which "might cause offence to a reasonable person; or [...] is unreasonably long; or without adequate justification, [...] is, includes, or resembles, an official title or rank." This is determined by the Department of Internal Affairs, which is responsible for registering names at birth. The most commonly rejected name is "Justice", which is a formal title for judges in New Zealand.
Below is a list of banned names in New Zealand:
 * [Asterisk]
 4Real
 89
 Anal
 Bishop
 Constable
 H-Q
 II
 III
 Justice
 Justus
 Knight
 Lucifer
 Mafia No Fear
 Minister
 Mr
 Queen Victoria
 Royale
 Saint
 Sex Fruit
 Talula Does The Hula From Hawaii

Norway
Names are regulated by the Norwegian Names Act of 2002. Parents may not choose a first name for their child that may become a significant disadvantage for the child. 
A citizen may change their family name to any common family name, i.e. any name shared by more than 200 Norwegians. In order to change to a rare family name, permission from every citizen with the name is required. Exceptions to the restrictions on taking a protected surname can be made if you have "a connection to the name", for example through kinship (family name held by a parent, step-parent or foster-parent, grandparent, great grandparent or great great grandparent), by marriage, cohabitation where you have lived together for at least two years or have children together, or through adoption. 

In April 2009, a six-year-old Norwegian boy named Christer pressed his parents to send a letter to King Harald V to approve his name being changed to "Sonic X". They allowed Christer to write it himself but did not send it until he badgered them further, and the king responded that he could not approve the change because Christer was not eighteen years old.

Portugal
Portugal has a set list of names approved and not approved published periodically by the Institute of Registration at the Ministry of Justice.

Saudi Arabia
There is a list of 50 names that are banned in Saudi Arabia. Western names Alice, Ben, Elaine, Lauren and Linda are among the names banned in that list.

Sweden

The older Names Act of 1982 states that Swedish first names "shall not be approved if they can cause offense or can be supposed to cause discomfort for the one using it, or names which for some obvious reason are not suitable as a first name." The newer naming law () states it identically.

Spain
In Spain, people have freedom to choose any name as long as the name doesn't make identification confusing, isn't the same name as one of their living siblings, and doesn't offend the person who is named.

Tajikistan 

The authorities of Tajikistan have announced the preparation of a list of 3,000 pre-approved names, all referred to Tajik culture, thus banning Arabic/Islamic names and suffixes, deemed divisive.

Among increasingly religious Tajiks, Islamic-Arabic names have become more popular over Tajik names.

The Tajik government has used the word "prostitute" to label hijab wearing women and enforced shaving of beards, in addition to considering the outlawing of Arabic-Islamic names for children and making people use Tajik names. Tajikistan President Rakhmon (Rahmon) has said that the Persian epic Shahnameh should be used as a source for names, with his proposed law hinting that Muslim names would be forbidden after his anti hijab and anti beard laws.

United Kingdom
The UK has no law restricting names, but names that contain obscenities, numerals, misleading titles, or are impossible to pronounce are likely to be rejected by the Registering Officer, when registering a child.

There are no restrictions on adults assuming any new name, unless the purpose of the name change is fraudulent.

United States

Restrictions vary by state, and most are imposed for the sake of practicality. For example, several states limit the number of characters in a name, due to limitations in the software used for official record keeping. For similar reasons, some states ban the use of numerals or pictograms. A few states ban the use of obscenities.  Conversely, a few states, such as Kentucky, have no naming laws whatsoever.  Courts have interpreted the Due Process Clause of the Fourteenth Amendment to the United States Constitution and the Free Speech Clause of the First Amendment as generally supporting the traditional parental right to choose their children's names.

One practice that some have found restrictive was California's practice of not recording names with diacritical marks, such as in the name José. The Office of Vital Records in the California Department of Public Health does not require that names containing other than the 26 alphabetical characters of the English language be accepted. In 2017, the California legislature passed bill AB-82, which would have required the State Registrar to record names containing diacritical marks to be recorded. However, Governor Jerry Brown vetoed the bill on the ground that mandating the use of diacritical marks on some state and local vital records without a corresponding requirement for all state and federal government records would create inconsistencies and require significant state funds to replace or modify existing registration systems.

Zaire

Zairians were urged to drop their Western or Christian names in favor of Zairian names as part of Authenticité. Zairian dictator Joseph-Désiré Mobutu changed his name to Mobutu Sese Seko Kuku Ngbendu Wa Za Banga (more commonly abbreviated to Mobutu Sese Seko).

See also 
Surname law
Deadnaming

References

External links
http://mentalfloss.com/article/68768/22-outlawed-baby-names-around-world
http://www.mirror.co.uk/news/weird-news/17-banned-baby-names-around-4725752
http://www.huffingtonpost.com/2014/04/24/banned-baby-names_n_5134075.html
Who, What, Why: Why do some countries regulate baby names?

Given names