Skip to content

NUI (.nui)

.nui file signature | application/octet-stream

NUI is a file format used by the Nuru ASCII/ANSI art system, originally associated with Nuru image and palette data. It is used to store text-based artwork and related color information for display in compatible viewers and art tools. The format is largely a legacy format and is generally considered safe, with minimal security concerns beyond the usual caution applied to untrusted files.

Safe

Magic Bytes

Offset 0
4E 55 52 55 49 4D 47

Sources: Wikipedia

All Known Signatures

2 signature variants are documented for .nui files across multiple sources.

Hex Signature Offset Sources
4E 55 52 55 49 4D 47 0 Wikipedia
4E 55 52 55 50 41 4C 0 Wikipedia

Extension

.nui

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .nui files in Python

Python
def is_nui(file_path: str) -> bool:
    """Check if file is a valid NUI by magic bytes."""
    signature = bytes([0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47])
    with open(file_path, "rb") as f:
        return f.read(7) == signature

How to validate .nui files in Node.js

Node.js
function isNUI(buffer: Buffer): boolean {
  const signature = Buffer.from([0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47]);
  return buffer.subarray(0, 7).equals(signature);
}

How to validate .nui files in Go

Go
func IsNUI(data []byte) bool {
    signature := []byte{0x4E, 0x55, 0x52, 0x55, 0x49, 0x4D, 0x47}
    if len(data) < 7 {
        return false
    }
    return bytes.Equal(data[:7], signature)
}

API Endpoint

GET /api/v1/nui
curl https://filesignature.org/api/v1/nui

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .nui file?

A .nui file is identified by the magic bytes 4E 55 52 55 49 4D 47 at byte offset 0. NUI is a file format used by the Nuru ASCII/ANSI art system, originally associated with Nuru image and palette data. It is used to store text-based artwork and related color information for display in compatible viewers and art tools. The format is largely a legacy format and is generally considered safe, with minimal security concerns beyond the usual caution applied to untrusted files.

What are the magic bytes for .nui files?

The magic bytes for NUI files are 4E 55 52 55 49 4D 47 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .nui file?

To validate a .nui file, read the first bytes of the file and compare them against the known magic bytes (4E 55 52 55 49 4D 47) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .nui files?

There is no officially registered MIME type for .nui files. Systems typically use application/octet-stream as a generic fallback when handling this format.

Is it safe to open .nui files?

NUI (.nui) 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.