RAR Metadata: How to View, Edit and Remove It Safely

November 08, 2026 · RAR.now Editorial · RAR Essentials

Understand which RAR metadata is useful, sensitive or required for correct rendering.

The Metadata Surface Area in RAR Archives

RAR archives carry metadata at three distinct layers: the archive header, individual file headers, and the recovery record area. Unlike formats that store metadata as a flat collection of key-value fields, RAR uses a rigid binary structure defined by the RAR 4.x and RAR 5.x specifications. The primary reference at www.rarlab.com/technote.htm documents these fields as part of the RAR 5.0 format specification, the default format for WinRAR 5.0 and later.

Each header block contains a CRC32 (RAR 4.x) or BLAKE2sp checksum (RAR 5.0) covering all header fields. Any modification that does not recalculate this checksum produces an archive that extraction tools will reject. This structural constraint defines what metadata operations are possible without a full archive rebuild.

Metadata Fields by Risk Level

Low-Risk: Required Structural Fields

File name and path are stored per entry. RAR 5.0 uses UTF-8 encoding; RAR 4.x uses the system default code page, which causes interoperability failures when archives move between locales. Paths can be absolute or relative depending on the -ep flag at creation time.

File size fields (uncompressed and compressed) are required for extraction and contain no user-identifiable data. CRC32 (RAR 4.x) or BLAKE2sp (RAR 5.0) checksums provide integrity verification only.

Archive name appears in the header only when the archive is stored as a single file. Self-extracting archives store the SFX module separately from the archive data.

Medium-Risk: Optional but Informative

File modification time uses DOS date/time format in RAR 4.x (2-second resolution) and Unix timestamp in RAR 5.0 (1-second resolution). RAR 5.0 extended time fields can store sub-second precision, creation time, and last access time via the ExtTime block.

Operating system origin is a 1-byte field. RAR 4.x values: 0=DOS, 1=OS/2, 2=Windows, 3=Unix, 4=Mac, 5=BeOS. RAR 5.0 extends this with additional platform identifiers. This field reveals which system created the archive.

File attributes store OS-specific flags. Windows archives carry read-only, hidden, system, and archive bits. Unix archives may carry permission bits (mode) stored in the upper bytes of the attribute field.

Archive comment supports up to 64 KB in RAR 4.x and 256 KB in RAR 5.0. Comments are stored as a separate block type and can contain arbitrary text, including notes, passwords, or contact information.

High-Risk: Unintended Exposure

Extended timestamps (ExtTime) in RAR 5.0 provide sub-second file times and can embed creation and access timestamps that reveal file lifecycle patterns.

Extended attributes (ExtAttr) in RAR 5.0 can carry NTFS alternate data streams, ACLs, and security descriptors. On Unix systems, WinRAR may store UID/GID values. When archives are shared, numeric IDs map to real users on the source system.

SFX script content embeds a plain-text configuration block delimited by ;!@Install@!UTF-8! and ;!@Setup@!UTF-8! markers. These scripts frequently contain absolute paths, environment variable references, and system-specific commands.

Viewing Metadata Without Extraction

Command-Line Inspection with unrar

The verbose listing command displays all file headers:

unrar v archive.rar

Output includes file names, uncompressed and compressed sizes, modification timestamps, OS byte, file attributes, and CRC32/BLAKE2sp checksums. For RAR 5.0 archives, the technical listing dumps raw header fields:

unrar vt archive.rar

This exposes recovery record counts, volume numbering, encryption flags, and extended time blocks. The vt command is the most complete metadata view available without hex-editing the archive.

Cross-Platform Inspection with 7-Zip

7z l archive.rar

The default listing shows file names, sizes, packed sizes, modification dates, and attributes. For block-level detail:

7z l -slt archive.rar

The -slt output includes CRC, compression method, and per-block details. 7-Zip does not display OS origin or extended timestamps.

WinRAR GUI Inspection

Open the archive and press Ctrl+I for archive-level information. The "File" tab shows per-entry metadata. The "Service" tab reveals embedded SFX commands. WinRAR's GUI does not expose extended attributes, ACLs, or ExtTime blocks; these require the command-line vt listing.

Editing Metadata: Hard Limits

RAR metadata is not designed for in-place editing. The header checksum covers all fields in the block, so any binary patch without checksum recalculation produces a corrupt archive.

What can be edited safely:

  • Archive comment: Use rar c archive.rar to add or replace the comment block. This operation updates only the comment block type and recalculates its internal checksum without touching file headers.
  • SFX script: Use rar s to modify the SFX configuration block, which is structurally separate from file headers.

What cannot be edited without a full rebuild:

File names, timestamps, attributes, OS byte, and extended fields. The only reliable method to change these is to extract all files and recompress with the desired metadata.

Removing Metadata

Full Sanitization by Rebuild

  1. Extract all files to a temporary directory.
  2. Strip metadata from the extracted files:
    • Windows: Remove attributes with attrib -r -h -s * /s. Zero timestamps with PowerShell: Get-ChildItem -Recurse | ForEach-Object { $_.CreationTime = '1970-01-01'; $_.LastWriteTime = '1970-01-01'; $_.LastAccessTime = '1970-01-01' }
    • Linux/macOS: find . -exec touch -t 197001010000 {} +
  3. Recompress with controlled metadata:

    rar a -ep -m5 -ma5 -tsm -tk -tl clean_archive.rar source_dir/
    

    -ep excludes absolute paths. -tsm stores only modification time, omitting creation and access timestamps. -tk preserves original timestamps without extended sub-second data. -tl sets archive timestamp to match the newest file. Omit -to to drop all extended timestamps from RAR 5.0 output.

Selective Removal Without Extraction

To clear only the archive comment:

rar c archive.rar -zNUL

This replaces the comment block with an empty block. For SFX archives, remove the configuration script:

rar s archive.rar -zNUL

The archive structure and all file headers remain intact. These operations do not affect file-level metadata.

Verification After Metadata Removal

Run an integrity test to confirm the archive is structurally valid:

unrar t archive.rar

Any CRC mismatch indicates corruption from an improper modification attempt. The test must complete with "All OK."

Audit remaining metadata by filtering the technical listing:

unrar vt archive.rar | grep -E "(Time|Attr|Owner|Comment)"

Confirm no extended timestamps, OS-specific attributes, or comment text survive.

Test extraction to a clean directory and verify that no absolute paths appear in the output tree. On Linux, check for path separators in file names:

find extracted_dir/ -name "*/*"

On Windows, inspect the full path tree with dir /s /b and verify no C:\Users\ or similar source paths leak through.

Format-Level Limitations

The RAR specification provides no built-in metadata stripping mechanism. No "anonymize" flag exists. All metadata removal must be performed externally by rebuilding the archive or using the limited comment/SFX editing commands.

Recovery records and recovery volumes contain parity data derived from file headers. If metadata is modified after recovery data is added, the recovery blocks become invalid and will fail verification. Always strip metadata before generating recovery records.

The header structure documented at www.rarlab.com/technote.htm uses fixed offsets and strict byte ordering. Binary editing tools that do not parse the RAR block structure will produce corrupted archives. Use only the official WinRAR or unrar tools for any metadata operation, or rebuild the archive from extracted files.