Developer tool

MIDI VLQ Decoder

Enter the encoded bytes of a MIDI variable-length quantity. The decoded value is displayed in decimal, hexadecimal, and binary.

Decode a value

Input format

Enter hexadecimal bytes, separated by spaces, or as one compact value (for example, 81 00 or 8100).

Pulses (ticks) per quarter note.

Try:

Decoded value

Decimal
128
Hexadecimal
0x80
Binary
0b10000000
Duration (quarter notes)
0.0133333333

Input notes

A MIDI VLQ contains one to four bytes. The high bit of each byte indicates whether another byte follows; the remaining seven bits carry the value.

Delta-time duration in quarter notes is the decoded VLQ value divided by PPQ. For example, CB 00 decodes to 9,600 ticks, which is 1.0 quarter note at 9,600 PPQ.

For decimal input, enter each encoded byte separately, such as 129 0, or enter the bytes as one packed value, such as 33024. In the matching input mode, prefixes such as 0x and 0b are accepted, as are spaces, commas, colons, or hyphens between bytes.