Skip to main content

Are there any letters/numbers that should be avoided in an ID? [Resolved]

For example, an image upload site that gives you a 5 digit ID for your file (

Should any letters/digits not be used in the final ID, to make it easier for people to read and share links (without copy and paste)?

Should I avoid i, I, l or 1? How about O or 0? In the URL bar in Chrome, 0 doesn't have a line through it, and I (uppercase i) and l (lowercase L) look different, but I'm not sure about other browsers, devices, screens, etc.. for example in this post, uppercase I and lowercase L look the same.

Question Credit: cantsay
Question Reference
Asked July 11, 2019
Posted Under: UI UX
6 Answers

What you are referring to are called Ambiguous characters since they seem similar to certain numbers.

You can get the list of those characters from this C code file on Pwgen.

If you are not comfortable reading C code, the characters and the corresponding confusing numerals (and letters) are

B = 8
G = 6
I = 1 = l (lowercase L)
O = 0
Q = D
S = 5 
Z = 2

All of this said, I strongly recommend choosing a font which will enhance the legibility of your text as that would help ensure the confusion is relatively lesser. The factors to choose the correct font would involve

  1. Fixed width: For picking out random numbers/letters, fixed width helps tremendously, since the kerning isn't changing as you move across the font.

  2. Use a font with separate 0/O looks - those definitely mess people up. Look for other letter/number combinations that are similar. Potentially, leave 0/O out of the mix just for this reason.

  3. Choose a font with subtle serifs and weight changes.

Here is an article worth checking out about font legiblity

I also recommend reading this interesting article on the UX coupon codes which has a couple of inputs on how to remove ambiguity. To quote the article

Solution 1: Deal with ambiguity If you are worried about the distinction between O0, 1Il, 8B, or any other combinations, treat them as the same character!

This is what Base32 does. It will standardize on one of the characters above (say the digits 018), and omit the ones are too similar (in this case OIlB).

When you receive input from the user, map the omitted characters to the canonical ones (e.g. replace the letter O with the digit zero). This way, even if the user can't figure it out, it doesn't matter anyways.

Solution 2: Remove all ambiguity Base32 still leaves characters which seem like they may be ambiguous, even if underneath they can't be. For users with a little experience with this, they will still stop to question what they are doing.

Ergo, you can take it a step further and completely remove all characters that could be perceived as ambiguous (e.g. all of 0O1Il8B).

After all, you don't actually need your alphabet size to be a power of two. It is easy enough to convert into arbitrary bases, and you don't need it to be particularly fast either (since this is often coinciding with user input).

credit: Andrew Leach
Answered July 11, 2019

Use uppercase letters and digits only, omitting I, O, 1 and 0. That should be unambiguous enough.

This same issue comes up with car licence plates. In New Zealand, custom plates have up to six characters, which can be any uppercase letter or digit. Foolishly, they allow both O and 0 as well as I and 1. As a result it is often hard to read a licence plate quickly (e.g. B1GB0Y), which seems to defeat the purpose.

I think they should have avoided this by using a single glyph for O and 0, and another single glyph for I and 1.

credit: Bennett McElwee
Answered July 11, 2019

There are indeed a series of characters that usually cause readability issues in some circumstances, depending on typeface used, for instance, or even in captchas because these are being distorted. This includes : - Letters vs digits: hard to tell distorted O from 0, 6 from G and b, 5 from S/s, 2 from Z/z, 1 from l - Digits vs digits: consider 5 with 6, 7 written differently in some countries or confused with 1, … - Letters vs letters: “vv” vs “w”, “cl” vs “d”, “nn” vs “m”, “m” vs “rn” vs “nn”, … - Characters vs clutters: random arcs sometimes introduced as clutters and perceived as confusing as opposed to characters (J vs L vs 7 for instance)

credit: ivandervaeren
Answered July 11, 2019

Depending on your audience it might be safest to avoid using vowels in your ID if users are meant to see this ID. So many bad words are easily removed from accidentaly being part of the ID by removing vowels.

credit: kimg85
Answered July 11, 2019
Your Answer