NUP (.nup)
.nup file signature | application/octet-stream
nuru ASCII/ANSI image and palette files[15]
Magic Bytes
Offset 0
4E 55 52 55 49 4D 47 4E 55 52 55 50 41 4C
Sources: Wikipedia
Extension
.nup
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .nup files in Python
def is_nup(file_path: str) -> bool:
"""Check if file is a valid NUP by magic bytes."""
signature = bytes([0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47, 0x4E, 0x55, 0x52, 0x55, 0x50, 0x41, 0x4C])
with open(file_path, "rb") as f:
return f.read(14) == signature
How to validate .nup files in Node.js
function isNUP(buffer: Buffer): boolean {
const signature = Buffer.from([0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47, 0x4E, 0x55, 0x52, 0x55, 0x50, 0x41, 0x4C]);
return buffer.subarray(0, 14).equals(signature);
}
How to validate .nup files in Go
func IsNUP(data []byte) bool {
signature := []byte{0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47, 0x4E, 0x55, 0x52, 0x55, 0x50, 0x41, 0x4C}
if len(data) < 14 {
return false
}
return bytes.Equal(data[:14], signature)
}
API Endpoint
/api/v1/nup
curl https://filesignature.org/api/v1/nup
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .nup file?
A .nup file is a NUP file. nuru ASCII/ANSI image and palette files[15]
What are the magic bytes for .nup files?
The magic bytes for NUP files are 4E 55 52 55 49 4D 47 4E 55 52 55 50 41 4C at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .nup file?
To validate a .nup file, read the first bytes of the file and compare them against the known magic bytes (4E 55 52 55 49 4D 47 4E 55 52 55 50 41 4C) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .nup files?
There is no officially registered MIME type for .nup files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .nup files?
NUP (.nup) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.