Ready, runs in your browser
0 chars · 0 words
bytes leaving your device
0
codepoint most fixes need
1
no signup, no run limit
Free

BOM stripper

What the BOM stripper does

The byte-order mark is U+FEFF, an invisible character some tools plant at the very start of a text file to flag how it's encoded. It renders as absolutely nothing, so a file with one looks completely normal in an editor while still carrying an extra character no one can see.

This app removes it, wherever it sits in the text, along with the zero-width spaces, joiners and soft hyphens that tend to travel the same routes. It's local: everything runs in your browser, nothing you paste is uploaded, and there's no limit on how much you clean or how often you're back.

For a debugging tool specifically, that local-only guarantee matters. You're usually pasting in something broken because of a character you can't see, and the last thing you want is a second layer of not-knowing what happened to it once it left your machine.

Workflow

How to remove a byte-order mark in three steps

A BOM is invisible by definition, so there's nothing to eyeball first.

Step 1
Paste the file's contents in, including the very first character.
Step 2
Press Remove. It runs instantly, on your device.
Step 3
Copy the cleaned text back into your file or import.

The character itself

What U+FEFF is, and why anything writes it

UTF-16 files can store their bytes in either order, and a byte-order mark up front tells a reader which order was used. UTF-8 doesn't actually need that signal at all, its byte order is fixed regardless, but a handful of tools, Windows Notepad chief among them, write a UTF-8 byte-order mark anyway as a kind of explicit encoding flag.

That's the entire origin story of most of these bugs: software meaning to be helpful by tagging a file's encoding, and other software reading that tag as the first character of real content instead of as metadata to skip.

Why it matters

What a byte-order mark breaks in CSV, JSON and scripts

In a CSV file, a leading BOM fuses onto the first column header. A column that's clearly named id in the editor gets read as an entirely different string by a strict parser, so any code checking for a header called id comes up empty, and the failure looks nothing like an encoding problem.

In JSON, a leading BOM isn't valid syntax at all. A strict JSON.parse call rejects the whole file, with an error message that says nothing about the invisible character actually responsible. In a shell script, a BOM sitting before the shebang line stops the OS from recognising #!/bin/bash as the interpreter directive, so the script fails to run in a way that looks like anything but an encoding bug.

The usual sources

Where a stray BOM usually comes from

Saving a file as 'UTF-8' out of Notepad on Windows writes one by default. Certain Excel export paths for UTF-8 CSV do the same. A handful of other Windows tools follow suit, on the logic that flagging the encoding explicitly is safer, even though virtually everything downstream assumes UTF-8 without being told.

The file passes every visual inspection along the way. It opens cleanly, looks right, and only fails once it reaches something that treats the BOM as data rather than metadata to skip.

Not just position zero

This checks the whole document, not just the first character

A BOM causes the most damage at the very start of a file, but it's not exclusively a start-of-file problem. Concatenating several files, a bad merge, or a paste from a source that already had one embedded partway through can leave a byte-order mark, or a zero-width space, sitting mid-document. This app scans the full text, not just the first position, and removes every hidden character it finds.

Who it's for

Who uses a BOM stripper, and when

Developers chasing a CSV import that silently fails to match a header, or a JSON.parse that throws on a file that looks completely valid in the editor, both land here. Teams maintaining shell scripts edited on Windows use it to rule out a leading BOM as the cause of a cryptic interpreter error.

It's also a habit before committing a config file or a data export: a stray BOM at the top of a file is exactly the kind of thing a code review scans right past.

FAQ

Everything answered. Nothing to click open.

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

Paste the contents into the box above and press Remove. The BOM and related hidden characters are stripped, and clean text appears on the right.

Is the BOM stripper free?

Yes. No account, no paste limit, no length cap, since it runs on your own device.

Is my file uploaded anywhere?

No. Removal happens entirely in your browser. Nothing is transmitted or logged.

What exactly is a byte-order mark?

U+FEFF, an invisible character placed at the start of some text files to flag their encoding. It renders as nothing but is still a real character in the byte stream.

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

A BOM fused to the first header changes what a strict parser reads as that column's actual text, even though the two look identical on screen.

Why does JSON.parse throw on a file that looks completely valid?

A leading byte-order mark isn't valid JSON syntax, so a strict parser rejects the whole file with no mention of the invisible cause.

Why does my shell script fail to run after editing it on Windows?

A BOM before the shebang line stops the OS reading it as the interpreter directive, so the script fails in a way that looks unrelated to encoding.

Why did Notepad add this to my file?

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

Does Excel's CSV export add one too?

Yes, certain UTF-8 CSV export paths in Excel include a byte-order mark, which is a frequent cause of the header-mismatch bug.

Does this tool only look at the start of the file?

No, it scans the whole document and removes a byte-order mark or other hidden character wherever it turns up.

Does removing a BOM change my file's encoding?

No. UTF-8 doesn't require one to be read correctly; removing it just drops an optional flag.

Does it clean up other invisible characters too?

Yes, zero-width spaces, joiners and soft hyphens are removed in the same pass.

Can a BOM end up mid-document instead of at the start?

It's uncommon but happens, usually from concatenating files or a rough merge. This tool checks the entire text, not just position zero.

Does it work on phones?

Yes, it works the same in any modern mobile browser.

Will cleaning change any of my actual content?

No, only the byte-order mark and other invisible characters are touched. Every visible character is unchanged.

Can I clean a whole config file with this?

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

Is there a batch mode or an API?

Not yet. Right now it's paste, remove and copy per file.

Is it safe for private data exports?

Yes, nothing is transmitted or retained by this tool.

How do I even know if a file has a BOM?

Paste its contents in and check the count reported before you run the cleanup.

Why does the file look totally normal but still fail to parse?

Because a byte-order mark renders as nothing, so a file can pass every visual check and still fail against a strict parser.