Invisible character reference · U+FEFF
Byte Order Mark (U+FEFF)
A one-character prefix that can make a perfectly valid JSON file fail to parse and a Python script throw a SyntaxError. Here's the plain-English guide — and a one-click remover.
By NoAtMark · Published Aug 13, 2026
The short version
| Property | Value |
|---|---|
| Name | Byte Order Mark (BOM), also Zero Width No-Break Space |
| Code point | U+FEFF |
| UTF-8 bytes | EF BB BF |
| Appearance | Invisible, at the very start of a file |
| Danger | Breaks strict parsers: JSON, Python, and some tools |
Why it breaks things
Editors on some platforms add a BOM to signal UTF-8 encoding. Many systems tolerate it; strict ones don't:
- JSON. A strict parser expects the document to start with
{or[. A leading BOM makes the first character unexpected, so the parse fails with "Unexpected token". - Python. A BOM at the start of a
.pyfile can causeSyntaxError: invalid character in identifieror a "unexpected UTF-8 BOM" error on some interpreters/tools. - Data imports. A BOM in a CSV header becomes part of the first column's name.
Where it comes from
A BOM is written when a tool saves UTF-8 with signature (common on Windows Notepad, some editors, and exports). It can also ride along in copied content when a BOM character is embedded in the text.
Remove it in one click
For files, drop them into the file cleaner — it strips the BOM and all other invisible characters while keeping structure.
Frequently asked questions
Is a BOM always bad?
Not always — many parsers handle it. But strict ones don't, and there's no downside to removing it when your tools complain.
How do I see a BOM?
It's invisible. A hexdump shows EF BB BF at the start; a scanner reports it by code point.
Does a BOM appear in the middle of text?
It's designed for the start, but a BOM character can appear elsewhere if copied content carried it. The scanner finds it anywhere.
References & further reading
- Unicode Standard (BOM) — unicode.org
- JSON is a text format — RFC 8259
- File cleaner — noatmark.com/tools/file-cleaner