BOM Remover First Bytes
Remove an initial UTF-8 EF BB BF signature from byte values and preserve every remaining byte, including interior signatures and other encoding BOMs.
Description
UTF-8 text can begin with the three-byte signature EF BB BF.
UTF-8 text can begin with the three-byte signature EF BB BF. Removing that prefix before further processing can keep the signature from becoming visible content while preserving the actual text bytes.1, 2
Remove an initial UTF-8 EF BB BF signature from byte values and preserve every remaining byte, including interior signatures and other encoding BOMs.
When to use BOM Remover First Bytes
Use this tool to remove an initial UTF-8 EF BB BF signature from byte values and preserve every remaining byte, including interior signatures and other encoding BOMs.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use BOM Remover First Bytes and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter bytes using the field table and calculation rules, then run the tool.
- Read bytes, removed. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| bytes | Byte values | list of integer; minimum: 0; maximum: 255; minimum entries: 0; maximum entries: 100000 | Required |
Enter byte integers from 0 through 255. The tool compares only the first three values with the UTF-8 signature and returns a copy starting after them when they match. Otherwise the entire byte list is copied unchanged. The removed flag records whether this one initial signature was removed; empty and truncated prefixes are unchanged.
removed = first three bytes equal [239, 187, 191] Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| bytes | Byte values | list of integer; minimum: 0; maximum: 255 |
| removed | Removed | boolean |
{
"input": {
"bytes": [
239,
187,
191,
65
]
},
"output": {
"bytes": [
65
],
"removed": true
}
} Limitations and assumptions
It does not validate or decode UTF-8, remove later signatures, or strip UTF-16/UTF-32 BOMs. Repeated initial UTF-8 signatures lose only the first one. Decoded strings require the first-cell U+FEFF tool instead.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use BOM Trim From First Cell: Remove exactly one initial U+FEFF from the first decoded cell only, preserving interior marks and all subsequent cells. For a complementary task, use UTF-16 BOM Encoding Check: Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.
Further background: Unicode encoding signatures and byte order marks.
References
-
BOM Remover First Bytes — tool.io
-
Unicode encoding signatures and byte order marks — Unicode Consortium
Similar or alternative tools
- BOM Trim From First Cell
Remove exactly one initial U+FEFF from the first decoded cell only, preserving interior marks and all subsequent cells.
- UTF-16 BOM Encoding Check
Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.