Check and Remove Byte Order Marks Online Detect and remove Byte Order Marks (BOM) from text files.
BOM Detector/Remover
Detect and remove Byte Order Marks (BOM) from text files.
Upload file
Drop or select a file to check for BOM.
View BOM status
See if a BOM is present, its type, and the encoding.
Remove if needed
Download the file without BOM if one was detected.
What Is BOM Detector/Remover?
BOM Detector/Remover checks files for the presence of a Byte Order Mark and lets you download a version without it. It is a special byte sequence at the beginning of a text file that identifies its encoding and byte order. While useful for UTF-16/32 files, a UTF-8 marker is often unnecessary and can cause issues with scripts, PHP files, and some parsers. This tool detects these markers for UTF-8, UTF-16 LE/BE, UTF-32 LE/BE, UTF-7, and UTF-1, shows the marker bytes, and lets you download the file with it stripped.
Why Use BOM Detector/Remover?
-
Detects 7 BOM types: UTF-8, UTF-16 LE/BE, UTF-32 LE/BE, UTF-7, UTF-1.
-
Shows exact BOM bytes in hexadecimal.
-
One-click BOM removal with file download.
-
Displays first bytes of the file for verification.
Common Use Cases
PHP/Script Issues
Remove UTF-8 BOM that causes "headers already sent" errors in PHP scripts.
CSV Import
Remove BOM from CSV files that causes the first column header to include invisible characters.
JSON Parsing
Fix JSON parse errors caused by BOM characters at the start of files.
Cross-Platform Compatibility
Remove BOM for consistent file handling across different operating systems and tools.
Technical Guide
The detector reads the entire file as an ArrayBuffer, then checks the first 4 bytes against known BOM sequences. Markers are checked in order from most specific (longest) to least specific:
- UTF-32 LE: FF FE 00 00
- UTF-32 BE: 00 00 FE FF
- UTF-8: EF BB BF
- UTF-16 LE: FF FE
- UTF-16 BE: FE FF
- UTF-7: 2B 2F 76
- UTF-1: F7 64 4C
Note: UTF-32 LE marker is checked before UTF-16 LE because UTF-32 LE starts with the same FF FE bytes.
Removal creates a new ArrayBuffer slice starting after the marker bytes. The result is downloaded as a Blob with the original filename.
Tips & Best Practices
-
1UTF-8 BOM is the most common problematic BOM โ it is often unnecessary.
-
2Some Windows programs add UTF-8 BOM by default (e.g., Notepad).
-
3BOM in CSV files can make the first column header unreadable by parsers.
-
4After removal, verify the file content is still correct by opening it in a text editor.
Related Tools
File Format Identifier
Detect file format by analyzing magic bytes (file signature) in the header.
๐ File Conversion
Encoding Detector
Detect text file character encoding (UTF-8, UTF-16, ASCII, Latin-1).
๐ File Conversion
Line Ending Detector
Detect and count line ending types (CRLF, LF, CR) in text files.
๐ File Conversion
File Metadata Viewer
View comprehensive file metadata including size, type, entropy, and hex header.
๐ File ConversionFrequently Asked Questions
Q What is a BOM?
Q Should I remove UTF-8 BOM?
Q Is it safe to remove BOM?
Q Will removing BOM change the file encoding?
Q How do I prevent BOM from being added?
About This Tool
BOM Detector/Remover is a free online tool by FreeToolkit.ai. All processing happens directly in your browser โ your data never leaves your device. No registration or installation required.