.LOCKB

LOCKB File

Bun Binary Lockfile
Ask a question
QUICK ANSWER

A .lockb file is Bun's binary install lockfile, almost always named bun.lockb. Bun writes it when you run bun install to pin the exact versions and integrity hashes of every dependency so installs are reproducible. It is not meant to be opened by hand. To read it, run bun bun.lockb in the project folder, which prints a yarn.lock-style text view, or open the project in an editor with Bun installed.

Developer: Oven (Bun) Category: Developer Files MIME: application/octet-stream
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 26, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the LOCKB file format?

A .lockb file is the binary lockfile created by Bun, the JavaScript and TypeScript package manager and runtime from Oven. It is almost always named bun.lockb and sits at the root of a project. Bun writes it when you run bun install, recording the complete resolved dependency graph: each package, its exact version, its metadata, its sub-dependencies, and integrity hashes. Pinning all of this lets every teammate and CI job install the same tree.

Oven built the format as binary for speed. It stores data in linear arrays, refers to packages by index or by a hash of the package name, and deduplicates long strings. The file opens with the ASCII header bun-lockfile-format-v0. The downside is that a binary lockfile is hard to review and does not show up in Git diffs, which is why Bun v1.1.39 added a text lockfile and Bun v1.2 made bun.lock the default for new projects. Existing bun.lockb files still work.

Security & safety

RISK: LOW

A bun.lockb file is generated data, not an executable, so opening or committing it is safe. Bun can 'run' the file only in the sense that bun ./bun.lockb prints its contents; it does not execute arbitrary code from the file. The only real caution is supply-chain trust: the lockfile pins specific package versions and their sources, so review dependency changes as you would any lockfile update. Never edit it by hand, since a corrupted binary lockfile will fail to parse.

Format details

in a nutshell
FULL NAMEBun Binary Lockfileaka bun.lockb, Bun lockfile
DEVELOPEROven (Bun)since 2022
MIME TYPEapplication/octet-stream
TYPEBinary
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102030405060708090a0b0c0d0e0f101112131415
HEX
62756E2D6C6F636B66696C652D666F726D61742D7630
ASCII
bun-lockfile-format-v0
Files begin with the ASCII header string 'bun-lockfile-format-v0' identifying the binary lockfile format version. The rest of the file is a serialized struct-of-arrays dump and has no line structure.

Programs that open LOCKB files

Windows3 apps
Bun (CLI) Open-source Run bun bun.lockb in the project directory to print the lockfile as readable yarn.lock-style text, or bun install to use it.
Visual Studio Code with the bun.lockb extension Free Install Bun, then open the project so the editor can show a readable view of bun.lockb.
@hyrious/bun.lockb parser Open-source Use this JavaScript library or its web tool to parse bun.lockb and print its contents without installing Bun.
macOS3 apps
Bun (CLI) Open-source Run bun bun.lockb to print the lockfile as readable text, or bun install to reinstall from it.
Visual Studio Code with the bun.lockb extension Free Install Bun, then open the folder to view bun.lockb as text inside the editor.
@hyrious/bun.lockb parser Open-source Parse and print bun.lockb contents in Node or the browser without Bun installed.
Linux3 apps
Bun (CLI) Open-source Run bun bun.lockb for a readable text dump, or bun install to install dependencies from it.
Visual Studio Code with the bun.lockb extension Free With Bun installed, open the project to inspect bun.lockb as readable text.
Git with textconv Open-source Configure git config diff.lockb.textconv bun so git diff shows bun.lockb changes as readable text.

Technical details

deep spec
EncodingBinary (serialized struct-of-arrays memory dump)
Byte orderLittle-endian (native to the machine that wrote it)
ContainerFlat custom binary format, not a standard container
CompressionNone; long strings over 88 characters are deduplicated to save space
Typical sizeA few KB to a few hundred KB depending on dependency count
StructureA header/magic string followed by linear arrays: package list, string buffer, dependency slices, resolutions, and hoisting trees. Packages are referenced by an auto-incrementing index or a hash of the package name rather than by repeated name strings.
IntegrityStores npm-style integrity hashes for each resolved package; the format itself is version-tagged via the header string
PlatformsWindows, macOS, Linux
NotesDesigned for fast reads and memory mapping. It is not human-readable and does not render in Git or GitHub diffs without a textconv helper. Superseded as the default by the text-based bun.lock (JSONC) in Bun v1.2, but still supported.
Human ReadableNo
Released2022
Latest versionbun-lockfile-format-v0
Specificationgithub.com

LOCKB conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with LOCKB files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about LOCKB files.

Frequently asked questions

How do I open a bun.lockb file?
Open a terminal in the project folder and run bun bun.lockb. Bun prints the lockfile as readable yarn.lock-style text. You need Bun installed for this.
Why is bun.lockb binary instead of text?
Oven chose a binary format so the lockfile loads and saves much faster than JSON or YAML. The tradeoff is that it cannot be read or diffed without a helper, which is why Bun later added the text-based bun.lock.
Should I commit bun.lockb to Git?
Yes. The lockfile pins exact dependency versions so every machine and CI run installs the same tree. Commit it like any lockfile. To see readable diffs, configure a Git textconv that runs Bun on the file.
How do I convert bun.lockb to the new bun.lock?
Run bun install --save-text-lockfile --frozen-lockfile --lockfile-only, then delete the old bun.lockb. Bun v1.2 uses the text-based bun.lock by default for new projects.
Can I edit a bun.lockb file by hand?
No. It is a serialized binary structure, not text. Change dependencies in package.json and run bun install to regenerate the lockfile. Editing the binary directly will corrupt it.
Is bun.lockb still supported in newer Bun versions?
Yes. Even though bun.lock (text) is the default since Bun v1.2, Bun still reads and installs from existing bun.lockb files without forcing migration.

References

1Bun docs - Lockfilebun.com
2Bun Blog - Bun's new text-based lockfilebun.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.PARTPartial Download File
4.MDMarkdown Document
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z