LOCKB JSON
File conversion

Convert LOCKB to JSON

QUICK ANSWER
Is it possible to convert LOCKB to JSON?
Yes - LOCKB converts to JSON.

The fastest path is the @hyrious/bun.lockb package, which reads the binary file and returns a JavaScript/JSON object you can serialize. On Bun 1.2 or newer you can also convert to the text bun.lock (which is JSONC) and read it directly. Either way you only get dependency metadata, not a runnable install.

Also to JSON: BDOB · EXPRESS · REPLIT

On this page

Tested on macOS, Windows & Linux
Last verified Sep 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert LOCKB to JSON?

bun.lockb is Bun's binary lockfile that pins exact dependency versions and integrity hashes; developers want .json so they can inspect, diff, or feed the resolution data into tooling that cannot read the opaque binary format.

How to convert LOCKB to JSON

@hyrious/bun.lockb OPEN-SOURCE

Install with npm i @hyrious/bun.lockb, then run parse(fs.readFileSync('bun.lockb')) and JSON.stringify the result to get JSON. An online demo also exists at hyrious.me/tool/bun.lockb.

Bun text lockfile (bun.lock) FREE

On Bun 1.2+, run bun install --save-text-lockfile --frozen-lockfile --lockfile-only to produce bun.lock, which is JSONC and can be read as JSON after stripping comments.

bun bun.lockb (print) FREE

Run bun bun.lockb to print the lockfile contents to the console in a human-readable form you can capture and reshape into JSON.

About these formats

Quality & what to watch

  • The output is dependency-resolution data only (package names, versions, hashes) - it is not a package.json and cannot be installed from directly.
  • @hyrious/bun.lockb's object shape mirrors Bun's internal structure, not any standard schema, so field names may differ from what your tooling expects.
  • Binary-format details can change between Bun versions, so a parser built for one version may misread a lockfile written by another.

Frequently asked questions

Is bun.lockb human-readable?
No. It is a binary format; you need a parser like @hyrious/bun.lockb or the text bun.lock to read it.
Do I need Bun installed to convert it?
Not for @hyrious/bun.lockb, which runs under Node. You do need Bun 1.2+ for the --save-text-lockfile route.
Will the JSON let me reinstall my dependencies?
No. It is metadata for inspection; installs still need package.json plus a real lockfile.
Is the JSON output a standard format?
No, it reflects Bun's internal lockfile structure rather than a published schema.