How does SSMS display varbinary data

ssmsvarbinary

When you store a .jpg file in a varbinary(max) column and then view the data in SQL Server Management Studio, it appears like "0xFFD8FFE000…"

Is this Hex Encoded or something? What is SQL Server doing to generate this string? Can it be converted to a valid JPG file?

Best Answer

It's binary data with some additional Hex characters for padding, etc per the Microsoft Docs: binary and varbinary

Padding is achieved by using hexadecimal zeros.