UTF-8 BOM Detector
Detect only an initial EF BB BF byte sequence; the rest of the input is not decoded or validated as UTF-8.
Description
A UTF-8 byte-order mark is the initial byte sequence EF BB BF.
A UTF-8 byte-order mark is the initial byte sequence EF BB BF. Its presence is a signature check separate from validation of the rest of the stream.1
Detect only an initial EF BB BF byte sequence; the rest of the input is not decoded or validated as UTF-8.
When to use UTF-8 BOM Detector
Use this for the following task: Detect only an initial EF BB BF byte sequence; the rest of the input is not decoded or validated as UTF-8.
Prepare the CSV text, decoded cells or byte values requested below. Choose delimiter and header flags explicitly when those fields are present.
How to use UTF-8 BOM Detector and understand its results
- Prepare the CSV text, decoded cells or byte values requested below. Choose delimiter and header flags explicitly when those fields are present.
- Enter bytes using the field table, then run the tool.
- Read hasBom. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| bytes | Byte values | list of integer; minimum entries 0; maximum entries 100000; each entry: integer; minimum 0; maximum 255 | Required |
Supply bytes in order. Compare exactly the initial three values, returning false for a shorter prefix or a later occurrence.2
hasBom = first three bytes are 239,187,191 This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| hasBom | Has bom | boolean |
{
"input": {
"bytes": [
239,
187,
191,
65
]
},
"output": {
"hasBom": true
}
} Limitations and assumptions
The rest of the bytes are not decoded or checked as UTF-8.
Supply the decoded cell strings or raw values declared by the input fields; this tool does not load a spreadsheet file. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose UTF-8 No-BOM Export Standard Check for this operation: Check a chosen export profile of well-formed RFC 3629 UTF-8 without an initial BOM, reporting UTF-8 validity separately from profile conformance; UTF-8 itself permits a BOM. For a complementary task, use Zero-Width Char In Cells Detector for this operation: Locate the explicit format-character set U+200B, U+200C, U+200D, U+2060, and U+FEFF in cells, reporting UTF-16 offsets and code points; this is not a universal glyph-width test.
Further background: Format and language reference: UTF-8 BOM Detector.
References
-
Format and language reference: UTF-8 BOM Detector — RFC Editor
-
UTF-8 BOM Detector — tool.io
Similar or alternative tools
- UTF-8 No-BOM Export Standard Check
Check a chosen export profile of well-formed RFC 3629 UTF-8 without an initial BOM, reporting UTF-8 validity separately from profile conformance; UTF-8 itself permits a BOM.
- Zero-Width Char In Cells Detector
Locate the explicit format-character set U+200B, U+200C, U+200D, U+2060, and U+FEFF in cells, reporting UTF-16 offsets and code points; this is not a universal glyph-width test.