Skip to content

Instantly share code, notes, and snippets.

@y-a-v-a
Created February 23, 2026 22:14
Show Gist options
  • Select an option

  • Save y-a-v-a/9f1991c563b6bcd10b71f42638a8a7dc to your computer and use it in GitHub Desktop.

Select an option

Save y-a-v-a/9f1991c563b6bcd10b71f42638a8a7dc to your computer and use it in GitHub Desktop.
Quick Look Preview for .jsonl Files on macOS

Quick Look Preview for .jsonl Files on macOS

Make .jsonl (JSON Lines) files show as plain JSON in Quick Look on macOS Catalina and later — no third-party software needed.

How It Works

We create a minimal app bundle that tells macOS ".jsonl files conform to public.json". This makes the built-in JSON Quick Look generator handle .jsonl files.

Steps

1. Create the app bundle

mkdir -p ~/Applications/JsonlViewer.app/Contents

2. Create the Info.plist

cat > ~/Applications/JsonlViewer.app/Contents/Info.plist << 'EOF'
<?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>CFBundleIdentifier</key>
  <string>com.local.jsonlviewer</string>
  <key>CFBundleName</key>
  <string>JsonlViewer</string>
  <key>CFBundleVersion</key>
  <string>1.0</string>
  <key>UTImportedTypeDeclarations</key>
  <array>
    <dict>
      <key>UTTypeIdentifier</key>
      <string>org.jsonlines.jsonl</string>
      <key>UTTypeConformsTo</key>
      <array>
        <string>public.json</string>
      </array>
      <key>UTTypeTagSpecification</key>
      <dict>
        <key>public.filename-extension</key>
        <array>
          <string>jsonl</string>
        </array>
      </dict>
    </dict>
  </array>
</dict>
</plist>
EOF

3. Register the bundle and reset Quick Look

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f ~/Applications/JsonlViewer.app
qlmanage -r
qlmanage -r cache

4. Verify

mdls -name kMDItemContentType somefile.jsonl

This should report a type conforming to public.json instead of a dyn.xxx dynamic type.

Press Space on a .jsonl file in Finder — it should now render as JSON.

Troubleshooting

If Quick Look still shows a blank preview, try logging out and back in to fully refresh the UTI database.

Uninstall

rm -rf ~/Applications/JsonlViewer.app
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -u ~/Applications/JsonlViewer.app
qlmanage -r
qlmanage -r cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment