
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
Apple property list parser/builder for Node.js and browsers. Supports XML, binary (bplist00), and OpenStep formats.
DOMParser in browsers (zero dependencies)npm install plist
import { parse, build } from 'plist';
// Parse any plist format (auto-detected)
const obj = parse('<plist version="1.0"><string>Hello!</string></plist>');
console.log(obj); // "Hello!"
// Build an XML plist from a JS object
const xml = build({ name: 'My App', version: 42 });
console.log(xml);
import { readFileSync } from 'node:fs';
import { parse } from 'plist';
const xml = readFileSync('Info.plist', 'utf8');
const obj = parse(xml);
Binary plists (bplist00) are auto-detected when passed as a Uint8Array or ArrayBuffer. You can also use parseBinary() directly:
import { readFileSync } from 'node:fs';
import { parse, parseBinary } from 'plist';
// Auto-detected from binary data
const buf = readFileSync('Info.plist');
const obj = parse(new Uint8Array(buf));
// Or use parseBinary() directly
const obj2 = parseBinary(new Uint8Array(buf));
The old-style ASCII format (used by defaults read on macOS) is auto-detected when the input starts with { or (:
import { parse, parseOpenStep } from 'plist';
// Auto-detected
const obj = parse('{ CFBundleName = "My App"; CFBundleVersion = 42; }');
// Or use parseOpenStep() directly
const obj2 = parseOpenStep('( item1, item2, item3 )');
import { build } from 'plist';
const xml = build({
CFBundleName: 'My App',
CFBundleVersion: '1.0',
LSRequiresIPhoneOS: true,
UISupportedInterfaceOrientations: [
'UIInterfaceOrientationPortrait',
'UIInterfaceOrientationLandscapeLeft',
],
});
Output:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>My App</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
</dict>
</plist>
import { writeFileSync } from 'node:fs';
import { buildBinary } from 'plist';
const data = buildBinary({
CFBundleName: 'My App',
CFBundleVersion: '1.0',
});
writeFileSync('Info.plist', data);
| Plist Type | JavaScript Type |
|---|---|
<string> | string |
<integer> | number |
<real> | number |
<true/> / <false/> | boolean |
<date> | Date |
<data> | Uint8Array |
<array> | Array |
<dict> | Object |
In bundled applications (Vite, webpack, etc.), just import normally — the browser-optimized build is selected automatically via conditional exports:
import { parse, build } from 'plist';
The browser build uses native DOMParser and string-based XML building, so @xmldom/xmldom and xmlbuilder are not included in the bundle.
Try the interactive playground →
parse(input)Parse a plist. Format is auto-detected.
string | Uint8Array | ArrayBufferPlistValueparseBinary(data)Parse a binary plist (bplist00).
Uint8ArrayPlistValueparseOpenStep(input)Parse an OpenStep/ASCII plist.
stringPlistValuebuild(obj, opts?)Build an XML plist string.
PlistValueboolean (default: true) — pretty-print with indentationstring (default: " ") — indentation stringstring (default: "\n") — newline stringstringbuildBinary(obj)Build a binary plist (bplist00).
PlistValueUint8ArrayPlistValuetype PlistValue =
| string
| number
| boolean
| Date
| Uint8Array
| PlistValue[]
| { [key: string]: PlistValue }
| null;
simple-plist is another npm package that provides similar functionality to plist. It allows for reading and writing plist files. Compared to plist, simple-plist may offer a simpler API and potentially fewer features, focusing on basic plist operations.
bplist-parser is a package specifically designed to parse binary plist files. While plist handles both XML and binary formats, bplist-parser is optimized for binary plists, which might make it faster or more efficient for that specific use case.
FAQs
Apple's property list parser/builder for Node.js and browsers
The npm package plist receives a total of 10,911,273 weekly downloads. As such, plist popularity was classified as popular.
We found that plist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.