Stream Chat vs. PubNub Chat

If you're evaluating chat APIs for your app, Stream and PubNub are two names you'll keep running into. They're both capable platforms, but they're built around different philosophies. PubNub started as a pub/sub infrastructure company and added chat on top. Stream was built for chat from day one.

This guide breaks down the key differences across features, developer experience, pricing, and compliance so you can make an informed decision quickly.

Stream vs. PubNub at a Glance

Stream PubNub
Primary focus Chat-first API & SDK General pub/sub + chat layer
UI components Production-ready UI kits (all major platforms) UI-agnostic: no official component libraries
React components Full UI kit, actively maintained Deprecated as of Jan 1, 2025
AI moderation Built-in (text + image) Requires third-party integration
Multi-tenancy Dedicated multi-tenant API Manual channel patterns required
Pricing model MAU-based, predictable Message/connection-based, complex to estimate
Compliance SOC 2 Type II, ISO 27001, HIPAA, GDPR SOC 2 Type II, ISO 27001, HIPAA
Uptime SLA 99.999% (enterprise) Available on enterprise plans
Edge infrastructure Global edge servers for reduced latency Global PoP network
Free tier Yes Yes

What Is PubNub?

PubNub is an enterprise-grade pub/sub platform that expanded into chat in 2019. Its core infrastructure is built to handle high-scale, real-time data transport (think IoT signals, financial tickers, and multiplayer game state) and its Chat SDKs were layered on top of that foundation.

PubNub's approach is intentionally UI-agnostic. Rather than shipping component libraries, it gives developers a backend SDK and leaves frontend implementation to the team.

PubNub does support core messaging features (threads, file attachments, reactions, offline access via Message Persistence, and access control), but teams are responsible for building and maintaining the visual layer themselves.

This makes PubNub a reasonable choice for engineering teams that want low-level control and are comfortable owning the frontend. It's less suited for teams that want to move quickly without reinventing common UI patterns.

What Is Stream?

Stream's Chat API is built specifically for in-app messaging. It combines backend infrastructure with a full suite of production-ready UI kits and SDKs that cover every major platform, so teams can ship a polished chat feature in days rather than months.

Component libraries are available for:

  1. Android (Jetpack Compose)
  2. iOS, (SwiftUI)
  3. Web (React, Angular, JS)
  4. React Native
  5. Flutter
  6. Gaming (Unreal or Unity)

Interfaces for the following use cases are included:

  • Social Chat
  • Team Collaboration
  • Live Streaming
  • Video Games

Selecting the use case will modify your chat settings depending on which one you choose. For example, choosing the Live Streaming use case will turn off typing indicators and read status since the volume of messages will likely be high. You can check out Stream's UI kit in the live demos to see the difference between these use cases.

Stream vs. PubNub: Head-to-Head

UI Components and SDKs

This is the most significant difference between the two platforms.

Stream ships complete, customizable component libraries for every SDK. React, React Native, iOS, Android, Flutter, Angular, Unreal, and Unity all include pre-built UI that teams can theme and extend.

PubNub's previous React component library is being retired. Its new SDK approach is UI-agnostic across JavaScript, Swift, and Kotlin, focused on backend functionality with no reusable visual components. Teams building on PubNub will need to build their own chat UI, integrate a third-party component library, or maintain the deprecated components themselves.

If frontend velocity matters to your team, Stream has a clear edge. You can preview the difference in Stream's live demos.

Features Out of the Box

Stream ships with the messaging features users expect without requiring custom development: message reactions, thread replies, slash commands, unread counts, rich URL previews, typing indicators, read receipts, and file attachments.

PubNub supports many of the same backend primitives, but features like unread counts, connection recovery, and message states need to be assembled by your team on top of the API. That's doable, but it's engineering time that adds up, especially under a product deadline.

Stream also supports configurable channel types that let you set granular permissions and toggle features per channel, like link sharing, read indicators, typing indicators, and more. PubNub requires developers to build similar permission systems manually.

Moderation

Both platforms offer automated text moderation. PubNub's Auto Moderation module includes a PubNub-hosted AI spam detection function that intercepts and blocks messages before publish, plus word-list masking and a Channel Monitor for manual review, though it's in beta (at the time of publishing). For broader text categories (bigotry, profanity, cyberbullying), PubNub requires third-party integrations like Tisane.

Stream's AI Moderation is the stronger out-of-the-box choice for image and multimodal moderation; PubNub's image moderation depends on an external provider (Sightengine) via serverless Functions rather than a native capability.

Building your own app? Get access to our Livestream or Video Calling API and launch in days!

Multi-Tenancy

Stream has a dedicated multi-tenant API built for apps that serve multiple isolated organizations or customer groups from a single deployment. This is common in B2B SaaS products, marketplaces, and healthcare platforms.

PubNub supports multi-tenant architectures, but they require developers to implement isolation patterns manually, typically through tenant-specific encryption keys and wildcard channel schemes. There's no dedicated multi-tenancy API.

Security and Compliance

Stream has completed SOC 2 Type II and ISO 27001 audits, and maintains HIPAA and GDPR compliance. Full details are available on Stream's security page.

PubNub also holds HIPAA, SOC 2 Type II, and ISO 27001 certifications. It offers regional data processing configuration (EU or APAC only), which is useful for teams with strict data residency requirements.

Pricing Model

Both Stream and PubNub use Monthly Active User (MAU) pricing, so the base structure is comparable. The main difference is how each handles concurrent connections.

Stream PubNub
Free tier 1,000 MAU, 100 concurrent connections 200 MAU
Entry paid plan $499/mo (or $399 billed annually) ~$98/mo
Included MAU (entry plan) 10,000 1,000
MAU overage rate $0.09 per user Proportional to usage
Concurrent connections Capped (500 on Start/Elevate; 100 on free) Unlimited on all plans
Concurrent overage Yes, charged per excess connection No cap, no overage
HIPAA Elevate plan ($675/mo) and above Available (contact sales)
Multi-tenancy Elevate plan and above Included
Enterprise Custom, 750,000+ concurrent Custom, contact sales

The key tradeoff: Stream's concurrent connection caps make it less suited to spiky workloads like live events or broadcasts, where connection counts can surge suddenly. PubNub imposes no concurrency limits on any plan, which is a meaningful advantage for apps where traffic is unpredictable. Stream is generally the better fit for steady-state chat workloads where MAU is the dominant cost driver.

Stream vs. PubNub Code-Level Comparison

Ultimately, a chat SDK must always be integrated into an existing product. Here's a quick look at how each provider supports that process, particularly for React developers.

After deprecating its React component library, PubNub's new approach is based on UI-agnostic Chat SDKs across platforms like JavaScript, Swift, and Kotlin. These SDKs focus on backend functionality, allowing developers to build or integrate their own frontend components using the frameworks of their choice.

Stream takes a different approach. It offers a robust UI component library for React, complete with theming, extensibility, and documentation that accelerates integration. In fact, all of its SDKs for React, React Native, iOS, Android, Flutter, Angular, Unreal, and Unity include customizable UI kits designed to help teams build feature-rich messaging UIs quickly and reliably.

Here is a fully working example for the Stream SDK:

import "stream-chat-react/dist/css/v2/index.css";

const user: User = {
  id: "lively-bird-4",
  name: "lively-bird-4",
  image: `https://getstream.io/random_png/?id=${userId}&name=${userName}`,
};

const apiKey = "<your-api-key>";
const userToken = "<your-user-token>";

const chatClient = new StreamChat(apiKey);
chatClient.connectUser(user, userToken);

const channel = chatClient.channel("messaging", "custom_channel_id", {
  name: "Talk about React",
  members: [userId],
});

const App = () => (
  <Chat client={chatClient} theme="str-chat__theme-light">
    <Channel channel={channel}>
      <Window>
        <ChannelHeader />
        <MessageList />
        <MessageInput />
      </Window>
      <Thread />
    </Channel>
  </Chat>
);

export default App;

While this is interesting, integration requires much more than just the most basic example possible.

Stream offers detailed guides for theming, message rendering, and behavior customization, including properties like read states, typing indicators, and reactions. These components are fully documented and ready to drop into production.

Rather than providing visual components, PubNub focuses on backend functionality, allowing developers to implement their own UI from scratch or with third-party libraries. This offers flexibility, but places more responsibility on teams to build and maintain consistent chat interfaces.

For example, Stream offers a detailed guide on how to write a custom typing indicator, with an explanation of the properties to access from the SDK for easy focus on being productive and putting something out quickly.

PubNub's SDK can support such features programmatically, but the UI must be implemented separately.

Here is an example of how the Stream code for that would look:

export const CustomTypingIndicator = (props: TypingIndicatorProps) => {
  const { threadList } = props;

  const { channelConfig, thread } = useChannelStateContext();
  const { client } = useChatContext();
  const { typing = {} } = useTypingContext();

  if (channelConfig?.typing_events === false) {
    return null;
  }

  const typingInChannel = !threadList
    ? Object.values(typing).filter(
        ({ parent_id, user }) => user?.id !== client.user?.id && !parent_id,
      )
    : [];

  const typingInThread = threadList
    ? Object.values(typing).filter(
        ({ parent_id, user }) =>
          user?.id !== client.user?.id && parent_id === thread?.id,
      )
    : [];

  return (
    <div>
      <div>
        {(threadList ? typingInThread : typingInChannel).map(({ user }, i) => (
          <div className="username">
            <div className="typing-indicator-name">{user?.name}</div>
            <div className="typing-indicator-role ">{user?.role}</div>
          </div>
        ))}
      </div>
      <div className="str-chat__typing-indicator__dots" />
    </div>
  );
};

PubNub's SDK offers limited built-in customization support. Stream's SDK, on the other hand, provides extensive customization options backed by clear, developer-friendly documentation. This makes it easy to get up and running quickly, while still giving teams the flexibility to tailor the chat experience to their product and brand.

Full Feature Comparison

Feature Stream PubNub
Native design assets Yes No
Customizable UI components Yes No
1:1 Messaging Yes Yes
Group Messaging Yes Yes
Channel Messaging Yes Yes
@mentions Yes Yes
Search Yes Yes
Pinned Messages Yes Yes
Custom Objects Yes Yes
Custom User and Channel Events Yes Yes
Slash Commands Yes Yes
Functions No Yes
Rich URL Preview Yes No
Typing Indicators Yes Yes
Message attachments and actions Yes Yes
Read receipts Yes Yes
Unread Message Counts Yes Yes
Delivered Indicators Yes Yes
Online User Presence Yes Yes
User to User Mute Yes Yes
User to User Block Yes Yes
Offline Support Yes Yes
Custom Metadata Yes Yes
Reactions Yes Yes
Threads and Replies Yes Yes
User Invites Yes Yes
Video Playback Yes Yes
File Uploads Yes Yes
Custom role management via SDK Yes No
Giphy Yes Yes
Push Notifications Yes Yes
Emoticons Yes Yes
Translations Yes Yes
Dedicated Multi Tenant API Yes No
Scalability for Live Events Yes Yes
Built-In AI Text Moderation Yes Beta (spam detection only)
Built-In AI Image Moderation Yes No
Moderation Ban User Yes Yes
Moderation Dashboard Yes Yes
Slow Mode Yes Yes
Announcement API Yes No
React Yes Yes
React Native Yes JS Chat SDK (framework agnostic)
Flutter Yes JS Chat SDK (framework agnostic)
iOS Yes Yes
Android Yes Yes
Unity Yes Yes
Unreal Yes Yes
Angular Yes JS Chat SDK (framework agnostic)
SwiftUI Yes via Swift Chat SDK
Jetpack Compose Yes via Kotlin Chat SDK
Livestream Traffic Feature Switches Yes Yes
Security Compliance Yes Yes
GDPR-friendly API endpoints Yes Yes
Customer Support Yes Yes

Migrating from PubNub to Stream

If you're currently on PubNub or have an in-house messaging solution, switching to Stream is more straightforward than it sounds. Stream's migration guide walks through the process end-to-end, and the team can help you plan and execute the transition.

Teams typically migrate to Stream for:

  • Faster frontend development via ready-made UI kits
  • Built-in moderation without third-party tools
  • Predictable MAU-based pricing
  • HIPAA compliance for regulated industries
  • Dedicated multi-tenancy support

Try Stream for Free

Sign up for a free account and have a working chat prototype running in about 60 seconds. If you'd like to talk through your specific use case or get help evaluating options, reach out to the team.