Push notification tester
Build an Apple push notification payload, check it against the APNs rules and size limit, and copy a ready curl, FCM or Simulator command.
No key, certificate or device token is needed or sent. The page only builds and checks JSON. Commands use shell variables you fill in on your own machine.
APNs request (HTTP/2, token auth)
FCM HTTP v1 equivalent
iOS Simulator
xcrun simctl push booted com.example.app payload.json
Save the payload as payload.json and use your bundle ID. The Simulator needs no device token or key.
What the validator checks
- The payload is valid JSON and has an
apsdictionary. Custom keys belong next toaps, not inside it. - Size: APNs counts the compact UTF-8 JSON and rejects more than 4,096 bytes (5,120 for VoIP) with
PayloadTooLarge. - Types:
alertis a string or a dictionary of title, subtitle and body;badgeis a whole number;soundis a file name,default, or a critical-sound dictionary. content-availableandmutable-contentmust be the number 1, nottrue.interruption-levelis passive, active, time-sensitive or critical;relevance-scoreis between 0 and 1.- Background pushes use
apns-push-type: background, priority 5, and no alert, sound or badge.
Sending the request
Token-based requests need a JSON Web Token signed with your .p8 key (ES256, with your Key ID and Team ID). Generate it on your own machine or server and keep the key private; a token is valid for up to an hour. Certificate-based requests use your push certificate with curl --cert instead of the authorization header.
Use the sandbox host for apps installed from Xcode and the production host for TestFlight and App Store builds. A BadDeviceToken error usually means the token and the environment do not match; DeviceTokenNotForTopic means apns-topic is not the app's bundle ID.
More detail: test push notifications without a server and the sending side of APNs.
Privacy
Everything on this page runs in your browser. It never asks for a .p8 key, certificate, JWT or device token, and nothing you type is sent anywhere.
Questions
What is the maximum APNs payload size?
4,096 bytes for regular notifications and 5,120 bytes for VoIP notifications, counted as UTF-8 JSON. Larger payloads are rejected with PayloadTooLarge.
Do I need to enter my .p8 key or device token?
No. This page only builds and checks the payload and prints commands with placeholders. You add the token and key on your own machine.
Why does my silent push not arrive?
A background push needs content-available set to 1, apns-push-type background, priority 5 and no alert, sound or badge. iOS also throttles background pushes, so some are delayed or dropped.
Should content-available be true or 1?
Use the number 1. Apple documents the value as 1, and a boolean may be ignored.
How do I test push notifications on the iOS Simulator?
Save the payload to a file and run xcrun simctl push booted followed by your bundle ID and the file name, or drag an .apns file onto the Simulator.
From the same developer
- Push Notification Tester: send APNs test pushes from your Mac.
- The device side of APNs.