New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

win-guid

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

win-guid

Windows GUID

unpublished
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1.2M
-29.79%
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Node.js CI npm downloads

win-guid

Small, dependency-free utility for working with Windows / CFBF GUIDs in JavaScript and TypeScript.

It parses canonical GUID strings into the Windows byte layout used by COM, OLE, and Compound File Binary Format (CFBF), and converts them back to the standard string form when needed.

This is useful when dealing with Microsoft file formats such as .asf, .doc,, .xls, .ppt, structured storage, or other binary formats that store GUIDs in little-endian Windows order.

For RFC9562 compliant UUIDs (network byte order), use uuid instead.

Installation

npm install win-guid

Usage

Parse a GUID string

import { parseWindowsGuid } from "win-guid";

const bytes = parseWindowsGuid("00020906-0000-0000-C000-000000000046");

// Uint8Array(16) in Windows / CFBF byte order

Use the Guid helper class

import { Guid } from "win-guid";

const guid = Guid.fromString("00020906-0000-0000-C000-000000000046");

API

parseWindowsGuid(guid: string): Uint8Array

Parses a canonical GUID string:

const bytes = parseWindowsGuid("00020906-0000-0000-C000-000000000046");

into a 16-byte Uint8Array using Windows / CFBF byte order.

  • Input is validated strictly
  • Case-insensitive
  • Throws Error on invalid input

class Guid

Creates a GUID from a canonical GUID string.

const guid = Guid.fromString("00020906-0000-0000-C000-000000000046");

guid.toString(): string

Converts the GUID back into the canonical string form.

  • Always uppercase
  • Round-trips cleanly with fromString
guid.toString();

Outputs something like:

00020906-0000-0000-C000-000000000046`

Licence

This project is licensed under the MIT License. Feel free to use, modify, and distribute as needed.

Keywords

GUID

FAQs

Package last updated on 13 Jan 2026

Related posts