Skip to content
TextArray
100% local

BOM manager (add / remove)

Add or strip the invisible UTF-8 byte order mark at the start of your text.

Input

BOM manager (add / remove)

The byte order mark is three invisible bytes — U+FEFF — that some editors and Windows tools stamp at the very start of a UTF-8 file. You never see it, but everything downstream does: a BOM makes a shell script fail on its first line, breaks a CSV import that expects a clean header, shows up as the mojibake before <?php or <?xml, and turns a JSON file into a parse error. This tool adds or removes it in one paste, and detects whether one is present without touching anything.

Remove strips exactly one leading BOM and leaves the rest of the text — including any deliberate zero-width no-break space in the middle — completely alone. Add prepends the BOM, but never a second one if it is already there, so it is safe to run twice. Detect reports the state and returns the text unchanged, for when you just need to know. The tally names what happened and gives the resulting UTF-8 byte count, where the BOM's three bytes are the only difference you will see.

Why would you ever add a BOM? A handful of tools still rely on it: Excel reads a BOM-less UTF-8 CSV as the local ANSI codepage and garbles accented names, so a BOM is the pragmatic fix for CSVs opened in Excel. For almost everything else — web servers, scripts, config files, source code — the BOM is a liability and removal is the answer.

Everything runs locally in your browser — your file content never leaves your device.

FAQ

What actually is a BOM?
The Unicode character U+FEFF at the start of a file. In UTF-16 it signals byte order; in UTF-8 it is redundant but sometimes used as an "this is UTF-8" marker. As text it is a zero-width no-break space, which is why it is completely invisible.
When should I remove the BOM?
Almost always. A UTF-8 BOM breaks shell scripts (the shebang must be the first byte), trips PHP and template engines into emitting stray output, and is rejected by strict JSON, YAML and some XML parsers. If a file "has an invisible character at the start" that breaks a tool, this removes it.
When is adding a BOM the right call?
Mainly for CSV files you will open in Microsoft Excel. Without a BOM, Excel guesses the local ANSI encoding and mangles accented characters; with a BOM it reads UTF-8 correctly. A few older Windows tools behave similarly.
Does it touch zero-width spaces inside the text?
No. Only a single BOM at the very start is added or removed. A U+FEFF that appears mid-text — as an intentional no-break space or an accidental invisible character — is left exactly where it is.
Is my text uploaded anywhere?
No. The BOM handling runs entirely in your browser and your text never leaves your device.