Decodex

Why a Base64 CSV starts with 77u/ and its first column looks wrong

A UTF-8 byte order mark can become an invisible character in the first column name. Compare a two-byte header with its five-byte counterpart.

Look at the first column name

Some readers consume a UTF-8 BOM at the start of a file. Others leave a leading U+FEFF in the decoded string. In the latter case, a column can display as id while a lookup for the two-character string id fails.

Compare the original file bytes

Adding EF BB BF before the letters id changes the decoded length from two to five bytes. It also makes the Base64 start with 77u/. A text preview may hide the difference. Restore the file as bytes and inspect the first three before editing the CSV.

Input bytes and Base64 output
InputBytes in hexadecimalBase64
id69 64aWQ=
BOM + idEF BB BF 69 6477u/aWQ=

Handle the marker when opening the CSV

In Python, open(path, encoding="utf-8-sig", newline="") consumes an initial BOM when present. Keep the source file untouched if its checksum matters. Replacing every U+FEFF in the text would also affect occurrences away from the start of the file.

Open the file decoder

Related guides

References

More online tools

Convert images, test your keyboard, and use other handy tools in your browser.

Explore Altomono tools