Is it a way to separate first / last name in Chrome autofill? Currently it shows only the name field. enter image description here

Yet many sites didn't heard about benefits of giving only one field for name vs two fields. enter image description here


The answer from Superole set me on the path for finding the answer. Unfortunately the Alt+code only works on Windows. So here I will focus on a more general case and then on Linux.

Here Simone explains:

You could consider inserting a non-breaking space into your surname.

  1. Find a Unicode encoder/decoder online, for example this
  2. Insert your name as text and convert it to a unicode string. Taking your example "Leonard James Akaar" will be converted into "Leonard%20James%20Akaar"
  3. Change the last space (Unicode %20) to a non-breaking space (Unicode %A0). The result will look like this "Leonard%20James%A0Akaar"
  4. Convert it back to text. You will see "Leonard James Akaar" again, but this time the first and the second space are different characters, and the autofiller will recognize "James Akaar" as a single word.
  5. Copy the text you obtained
  6. Open settings -> advanced -> passwords and forms -> autofill settings -> edit. Replace your name with the edited one.

However in my case, when I copy the line with the invisible character from the browser my clipboard seems to change it for an space, so when I paste the line on Chrome settings it doesn't change anything. So save yourself some time and paste the result back into the same translator page to verify.

One workaround I found for Linux is:

  1. Open a console / terminal
  2. Open a python interpreter
# python
  1. Inside it, execute this (modify the location of \u00A0 to your needs
# print(u"Name Surname1\u00A0Surname2")
  1. Copy the result with the mouse > right click

enter image description here

Now that string contains the invisible character. You can use the translator page to verify it.

enter image description here

Finally, you can use these forms to verify if the autofill works as expected

Note: Simon mentioned "%A0" but I needed a code for python. Here I found the translation table.

%A0 windows character into unicode

More descriptive title so others can find it: How to make Chrome browser autofill feature handle correctly two surnames, multiple surnames, multiple names, two names, complex names when filling / autofilling online forms.

  • This is a really good solution for even a final user, maybe google should take a look at this for further documentation.
    – Rodrirokr
    May 12 '20 at 20:35

use autocomplete attributes

Use any of these for autocomplete:

  • name (for full name)

  • given-name (for first name)

  • additional-name (for middle name)

  • family-name (for last name)

      Example: <input type="text" name="fname" autocomplete="given-name">

This way, you can have the desired info autofilled in the user's form.

Also, here's the recommended guide for all other input fields too.

  • 2
    This is nice to know for web-devs, but I believe the OP wanted to know if there is a way to tell Chrome what's what. Currently it seems Chrome splits the name on whitespace, adds the first word to given-name, the last to family-, and the rest to additional-. Which is a poor assumption, making the autofill less useful.
    – Superole
    Aug 6 '19 at 11:29

I finally found a sort of workaround that seems to trick Chrome's splitting algorithm.

In the edit address form (chrome://settings/addresses -> more -> edit) you can replace the spaces that are not "name separators" with the character that you get when you hold downAlt, type 255 on the numeric keypad, and then release the Altbutton.

E.g. for given-name "Kaare Bjarne" and family-name "Van der Kurt" you would get:

Kaare Bjarne Van der Kurt

...and Chrome now seems to autofill it correctly :)

On this page you can test your settings quickly: https://www.roboform.com/filling-test-all-fields

  • Note that this non-breaking-space character sometimes gets converted to a normal space, when you copy/paste it...
    – Superole
    Jan 17 '20 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.