Text & Lists
Null bytes Remover
Remove NUL (U+0000) characters from pasted text in your browser. The result is the remaining bytes as a decimal JSON array, not text.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
Null bytes Remover deletes every U+0000 (NUL) character from pasted text. It returns the remaining bytes as a JSON array of decimal numbers, not as text. Pasting H, NUL, i, NUL, which is UTF-16LE text read one byte at a time, returns [72,105]. Visible text such as 00 or \0 is not a NUL and stays.
The result is a JSON array of byte values with every 0 removed, such as [72,105]. Copy and Download both give that array.
- Recover the letters of UTF-16LE text that was pasted one byte per character.
- Count the NUL padding in a fixed-width field copied from a binary record.
- Get the decimal byte values of a short string without its NUL characters.
Instructions
- Paste text that contains real NUL characters into Input. The page has no file picker and no hex input.
- Read the byte array. Each number is one remaining byte from 1 to 255.
- For ASCII text, compare the array length with the visible character count. The difference is the number of NUL characters removed.
- Copy or download the array. The download is JSON text, not the cleaned binary data.
Example
Input: H, NUL (U+0000), i, NUL (U+0000)
Settings: None. This tool has no options.
Result: [ 72, 105 ]
72 and 105 are the byte values of H and i. The result stays a number list; it is not converted back to text.
Limits
- The output is never readable text. Convert the decimal byte list to characters in another step.
- Characters up to U+00FF become one byte each. If any character is above U+00FF, the whole input is encoded as UTF-8. So é stays 233, but € becomes 226, 130, 172.
- Removing zero bytes recovers UTF-16 text only for characters up to U+00FF. Other characters need a real UTF-16 decoder.
- Only byte 0 is removed. Other control characters, such as U+0001 or a tab (9), stay in the array.