How to Use the macOS plutil Command to Edit Property List Files

The Problem with Preferences

In the Windows operating system, application settings are stored in a massive, centralized database called the Registry. In macOS, Apple uses a completely different philosophy. Every single application saves its settings in its own isolated “Property List” file (usually ending in .plist). These files dictate everything from how the Safari browser behaves to the hidden system configurations of the core operating system.

If you are a Mac systems administrator, you frequently need to edit these files to deploy custom corporate settings (like forcing a specific homepage in Safari). The problem is that modern macOS does not save these files as simple text anymore. To save hard drive space and increase read speeds, Apple compresses them into binary code. If you try to open a modern .plist file in a standard text editor, you will just see unreadable garbage characters.

To safely read, edit, convert, and validate these critical preference files directly from the command line, you must use the plutil (Property List Utility) command.

Step 1: Open the Terminal

Because you are manipulating system configuration files, some advanced plutil operations require administrator privileges, but reading standard user preference files can be done normally.

  1. Press Command + Space to open Spotlight Search.
  2. Type Terminal and press Enter.

Step 2: Viewing the Unreadable

Assume you have navigated to the ~/Library/Preferences/ folder and found the hidden Safari preference file (com.apple.Safari.plist). Because it is a binary file, you cannot use the standard cat command to read it.

The plutil command can translate the binary file into human-readable XML code and print it to your screen instantly using the -p (print) flag.

plutil -p com.apple.Safari.plist

The terminal will instantly output a beautifully formatted, readable list of every single setting Safari is currently using. It does not permanently change the file; it simply translates it for your eyes.

Step 3: Converting the File Format

If you actually need to permanently edit the file, printing it to the screen is not enough. You must physically convert the file from a compressed binary format back into standard XML text so you can open it in a text editor (like nano or vim).

You use the -convert argument, followed by the format you want (xml1), and the filename.

plutil -convert xml1 com.apple.Safari.plist

The file is instantly converted. You can now open it in a text editor, find the exact setting you want to change, save your edits, and close the editor.

Once you are finished editing, you must convert it back to binary format, or the application might refuse to read it.

plutil -convert binary1 com.apple.Safari.plist

The file is instantly compressed back into unreadable machine code, safely securing your new settings.

Step 4: Validating the Code

The biggest danger of manually editing a .plist file in a text editor is making a syntax error. If you accidentally delete a single closing bracket (e.g., </dict>) while editing the XML, the entire file is mathematically corrupted. When the application tries to launch, it will crash instantly.

Before you deploy a modified file to hundreds of corporate Macs, you must mathematically prove that its syntax is perfect.

You can use the -lint flag (a programming term for analyzing code for potential errors).

plutil -lint com.apple.Safari.plist

If your code is flawless, the terminal will simply output: “com.apple.Safari.plist: OK”. If you made a mistake, it will instantly tell you exactly which line of code is broken, allowing you to fix it before a catastrophic deployment. By mastering the plutil command, you gain absolute control over the hidden mechanics of macOS.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.