Playground environment for experimenting with Web Bluetooth | github.com/jaronbarends/webbluetooth.js
Information on the internet is scattered and not always clear for my layman's knowledge. The following information is what I now think is correct ;)
A UUID is a 128-bit number (e.g. 0000ffe5-0000-1000-8000-00805f9b34fb) formatted as 8-4-4-4-12 hexadecimals
Some UUIDs are specified(?) by the Bluetooth Special Interest Group (SIG). These all end in -0000-1000-8000-00805f9b34fb. These UUIDs also have a 32-bit or 16-bit alias, where the default part is left of.
e.g. service 0000ffe5-0000-1000-8000-00805f9b34fb (128-bit) is the same as 0000ffe5 (32-bit) and ffe5 (16-bit).
In the Web Bluetooth API, the 128-bit versions should be passed into functions as strings, the 32-bit and 16-bit versions as hexadecimal numbers, e.g. 0xffe5.
Some of the SIG UUIDs also have a specific standard name (see https://www.bluetooth.com/specifications/gatt/services) e.g. 'heart_rate'. These names can also be used as UUID.
I've come across both uppercase and lowercase UUIDs. Web Bluetooth expects you to use lowercase only.