gptcleanuppro.com / bom-stripper
Ready · local0w
Works with text copied from
ChatGPTClaudeGeminiGrokCopilotPerplexity
codepoint at the root of the bug
1
bytes sent to a server
0
length or run limit
None

The tool

A stripper for the one character most encoding bugs come down to

The byte-order mark, U+FEFF, is a single invisible character that some tools write at the start of a text file to indicate its encoding. It renders as nothing, so a file carrying one passes every visual inspection, and still fails the moment it reaches a parser that treats the mark as content rather than metadata.

This tool removes it, along with a small set of related hidden characters, entirely client-side. Nothing is uploaded, so there is nothing to log or queue, which is also why there is no run limit.

How it works

How to remove a byte-order mark in three steps

A BOM is invisible by definition, so there's nothing to verify visually before running this.

Step 1
Paste the file's contents into the input field, including the first character.
Step 2
Run the removal. It executes instantly, locally.
Step 3
Read the result and return it to the file, import or script.

The character, precisely

What U+FEFF is, and why it gets written at all

UTF-16 text can store its bytes in either order, and a byte-order mark at the start of a file specifies which order was used. UTF-8's byte order is fixed regardless of any such marker, so it does not require one, but several tools, Windows Notepad prominent among them, write a UTF-8 byte-order mark anyway as an explicit encoding flag.

That decision is the origin of most of the downstream bugs: software tagging a file's encoding for safety, and other software downstream reading that tag as the first literal character of the file's actual content.

Failure modes

What a byte-order mark breaks, by format

In CSV, a leading BOM fuses onto the first column header. A header that reads as id in a spreadsheet is read as a different string entirely by a strict parser, so code checking for a header literally named id fails to find it, with no error that points at encoding as the cause.

In JSON, a leading BOM is invalid syntax outright. A strict JSON.parse call rejects the file wholesale, with an error message that gives no indication the actual fault is one invisible character. In a shell script, a BOM preceding the shebang line prevents the operating system from recognising the interpreter directive, so execution fails in a way that reads as unrelated to encoding entirely.

Provenance

Where a stray byte-order mark typically originates

Saving a file as UTF-8 from Windows Notepad writes one by default. Certain Excel export paths for UTF-8 CSV do the same. A handful of other Windows-native tools follow the same convention, on the premise that an explicit encoding flag is safer than an implicit one, though most modern software assumes UTF-8 without needing to be told.

The resulting file passes every visual inspection along the way: it opens cleanly and reads correctly, right up to the point where it meets a parser that treats the mark as data instead of metadata.

Beyond position zero

This tool scans the full text, not only the first character

A byte-order mark causes the most visible damage at the start of a file, but concatenating several files, a rough merge, or a paste from a source that already carried one mid-document can leave it, or a zero-width space, sitting anywhere in the text. This tool checks the entire document rather than only the leading position, and removes every hidden character it detects.

Who it's for

Who uses a BOM stripper, and when

Engineers debugging a CSV import that silently fails to match a column name, or a JSON.parse call throwing on a file that reads as valid in an editor, use this to rule out an encoding cause quickly. Teams maintaining shell scripts edited on Windows use it to check for a leading BOM before assuming a more complex bug.

It's also a routine check before committing a config file or a data export, since a stray byte-order mark at the top of a file is precisely the kind of defect a code review scans past without noticing.

FAQ

BOM stripper, answered precisely

All answered in full, nothing to click open.

How do I remove a byte-order mark from a file?

Paste the contents into the input field and run the removal. The byte-order mark and related hidden characters are stripped and the clean text is returned.

Is the BOM stripper free?

Yes. No length cap and no run limit, because the work happens on your own device rather than on a metered server.

Is my file uploaded anywhere?

Not by this tool. Removal runs entirely client-side. Other tools on this site that rewrite or generate text send content to a server, stated on those pages.

What precisely is a byte-order mark?

U+FEFF, an invisible character some tools write at the start of a text file to signal its encoding. It renders no glyph but remains a real character in the byte stream.

Why doesn't my CSV column header match what I typed?

A BOM fused to the first header changes what a strict parser reads as that column's literal text, despite the two appearing identical visually.

Why does JSON.parse reject a file that looks entirely valid?

A leading byte-order mark is invalid JSON syntax, so a strict parser rejects the whole file with no error text pointing at the invisible cause.

Why does a shell script fail after being edited on Windows?

A BOM preceding the shebang line stops the operating system from recognising it as the interpreter directive, producing a failure unrelated-looking to encoding.

Why does Notepad write this character into my file?

Saving as UTF-8 from Windows Notepad writes a byte-order mark by default, as an explicit encoding flag.

Does Excel's CSV export include a BOM?

Certain UTF-8 CSV export paths in Excel do, and it's a frequent cause of the header-mismatch failure described above.

Does this tool check only the start of the file?

No, it scans the entire document and removes a byte-order mark or other hidden character wherever it appears.

Does removing a BOM change the file's encoding?

No. UTF-8 does not require a byte-order mark to be read correctly; removing it drops an optional flag, not the encoding itself.

Does it remove other hidden characters in the same pass?

Yes, zero-width spaces, joiners and soft hyphens are removed alongside the byte-order mark.

Can a byte-order mark appear mid-document rather than at the start?

It can, typically from concatenating files or a rough merge. This tool scans the full text, not only the leading position.

Does it work on mobile devices?

Yes, the layout adapts and the removal runs identically on mobile.

Does cleaning alter any actual content?

No, only the byte-order mark and other invisible characters are affected; every visible character is returned unchanged.

Can I clean an entire configuration file?

Yes, paste its contents in. Indentation and line breaks are preserved.

Is there a batch mode or an API?

Not currently. This is a single-document, browser-based tool.

Is it suitable for confidential data exports?

Yes, nothing is transmitted or retained by this tool.

How would I know a file has a byte-order mark at all?

Paste the contents in and check the count reported before running the cleanup.

Why does a file that opens and reads correctly still fail to parse?

Because a byte-order mark renders as nothing, a file can pass every visual check and still contain the one character a strict parser rejects.

Strip the byte-order mark, nothing sent anywhere.

Removed locally, with no run limit and no signup.

Open the stripper