What this tool removes
This tool removes the UTF-8 Byte Order Mark (BOM) from the beginning of supplied text or a text file. The BOM is the Unicode character U+FEFF, represented in UTF-8 bytes as EF BB BF. It can contribute to PHP “headers already sent” errors and JSON parsing problems.
How to remove a BOM
- Paste text into the input textarea, or choose Upload to select a file.
- You can also drop a text file anywhere on this page. Selected and dropped files are read in the browser with
FileReader.readAsText(); the shared upload code states that files do not leave the browser. - Review the processed text in the output textarea.
- Select Copy to copy the output, or select Download to save it as
remove-bom-output.txt.
Limits and undocumented cases
- Accepted file extensions and a file-size limit are not exposed.
- The page does not document the result for empty input or input without a BOM.
- The page does not state whether it removes one leading BOM or multiple leading BOMs.
- Behavior for non-UTF-8 files and any encoding conversion is not documented.
- Removal of unrelated whitespace or other characters is not documented.
Frequently asked questions
What is a Byte Order Mark (BOM)?
A BOM is the Unicode character U+FEFF at the start of a file. In UTF-8, it appears as EF BB BF. It can cause PHP “headers already sent” errors or “Cannot modify header information” errors, and it can break JSON parsing.
How to detect a hidden BOM in a file?
BOM characters are invisible. Unexpected blank lines or a “Cannot modify header information” error can indicate that a file contains one. Use Upload or drop a text file anywhere on this page, then review the output textarea. The tool does not provide a separate detection report.