JSON to plist
Turn JSON into a property list for an Info.plist, an entitlements file, a launchd job or an app's defaults. Choose the XML format, with the DOCTYPE plutil writes, or the binary bplist00 format as a real file. A plist has types JSON does not — dates, raw bytes, integers distinct from reals — and no null, so each of those is a visible choice rather than a guess. The reverse is plist → JSON.
How to convert JSON to a plist
- Paste JSON, or drop a
.jsonfile on the left pane. - Choose XML for a file people will read and diff, or binary for the compact format
plutil -convert binary1produces. Binary output is shown as base64; the download is the binary file itself. - Decide what happens to
null, which a property list cannot hold: leave it out (the status line lists every path it dropped), write an empty string, or stop. - Download the
.plist. On a Mac,plutil -lint data.plistconfirms it parses.
How JSON types become plist types
- Object →
<dict>, keys in your order. Order means nothing in a plist, andplutilsorts the keys when it writes XML. - Array →
<array>; string →<string>, with&,<and>escaped and a carriage return written as so XML parsing does not turn it into a newline. - Numbers follow how they are written in your JSON:
42becomes<integer>, while42.0and4.2e1become<real>— the same ruleplutilapplies when it reads JSON. Integers keep every digit across the full 64-bit range a plist allows, −263 to 264−1. true/falsebecome<true/>and<false/>.- A string in the form
2024-05-06T07:08:09Zbecomes<date>while the checkbox is ticked. Untick it to keep such strings as strings. {"$data": "base64…"}becomes<data>, and{"$date": "…"}a date whatever the checkbox says — the shapes plist → JSON can write so that a round trip loses nothing. Only an object with that single key counts.{"CF$UID": 7}is how Apple's XML spells a keyed-archiver reference; binary output stores it as a real UID, asplutildoes when it converts the same XML.
XML or binary
The XML format is the one in Apple's DTD: <dict>, <array>,
<string>, <integer>, <real>, <true/>,
<false/>, <date> and base64 <data>. Its dates are whole
seconds — Apple's parser accepts exactly YYYY-MM-DDTHH:MM:SSZ — so a fractional second in your JSON is
dropped in XML and kept in binary, and the status line tells you when that happened. Some characters cannot be
written in XML at all, even escaped: a string containing U+0000–U+001F other than tab, newline and carriage return
stops XML output with its path, and binary output carries it.
The binary format, as laid out in Apple's CFBinaryPList.c, is the eight bytes bplist00, a
table of objects, a table of their offsets, and a 32-byte trailer. Strings are stored as ASCII or UTF-16, dates as
a float64 count of seconds since 1 January 2001, and repeated strings — typically keys — are stored once. Before
showing any output, the page reads it back with its own parser and compares every value with what you pasted.
FAQ
Why not just run plutil -convert xml1 on the JSON?
You can, for simple files. On the Mac this page was tested against, plutil stops at the first null with “Invalid object in plist for property list format”, and it leaves date-shaped strings as strings, so a conversion from JSON never produces a <date> or <data>.
Can a plist's top level be an array or a plain string?
Yes. Apple's DTD lets <plist> hold any one value, so a JSON array or even a single string converts as it is. Most things that read plists — Info.plist, launchd, user defaults — expect a dictionary, though.
Is the binary file byte-for-byte what plutil would write?
No, and it does not need to be: key order and the order objects are laid out in differ. It is the same format, it passes plutil -lint, and it reads back to the same values in plutil and in Python's plistlib, which is how it was tested.
What if my JSON has a field that is literally called $data?
Only an object whose one and only key is $data with a string value is read as bytes, and if that string is not valid base64 you get an error rather than a silent conversion. An object with $data alongside other keys stays a dictionary.
Is my JSON uploaded?
No. The converter is plain JavaScript in this page, with no library to fetch, and runs entirely in your tab.