SSE Client

Enter the URL of an SSE (text/event-stream) endpoint and press Connect: your browser connects straight to the server and logs each event split into event, id and data. This site’s server relays nothing.

On-deviceNetwork lookupMobile friendly
ConnectionNot connected

An http:// or https:// URL. The page does not connect when it opens. Only when you press Connect does your browser connect directly to the other side.

EventSource is the browser’s built-in SSE. It cannot set headers (not even Authorization). If you need cookies, turn on “Send credentials”. When the connection drops the browser reconnects by itself and sends the last id in the Last-Event-ID header.

EventSource receives events other than “message” only when you name them. Separate with commas or spaces (e.g. update, delete). The fetch stream logs every event whatever its name.

Latest id: none yet

Connection settings (URL etc.) are saved in this browser. The query (after ?), user info and credentials are not saved.

If it does not connect (most common first)

The browser connects straight to the other side. This site’s server does not relay anything.

  1. Blocked by CORS. Both EventSource and fetch are subject to CORS: the server must allow this page’s Origin (https://tools.itlibra.com) in Access-Control-Allow-Origin. With credentials it must return that one Origin instead of *, and also Access-Control-Allow-Credentials: true. CORS Studio can find the cause. The browser shows the reason only in the developer console, not to the page.
  2. The response is not 200, or its Content-Type is not text/event-stream. By the specification the connection fails in either case (HTTP 204 is the signal to stop reconnecting).
  3. This page is https but the address is http:// (mixed content). Use https://.
  4. You need a header such as Authorization but use EventSource. EventSource cannot set headers; switch to the fetch stream (only if the server allows that header through CORS).
  5. A reverse proxy or CDN holds the response back before sending it (buffering). If events arrive late and in bursts, check the proxy’s buffering setting.
  6. The server is down, a firewall blocks it, or the URL path is wrong.
Paste a stream and split it (no connection)

Paste the body of a text/event-stream (for example taken with curl). It is split into event, id, retry, data and comments as the WHATWG HTML Standard says, and listed in the log on the right.

Message log

Searches event names, topics and bodies (binary as hex and as text).

0 messages logged (0 shown)

No messages yet. Once connected, what you send and receive is listed here (newest first).

Selected message

Select a message in the list to see its content.

How to use

  1. Enter the SSE URL (https://… or http://…).

  2. Choose how to read it. EventSource is the browser’s built-in way and cannot set headers. The fetch stream can set headers such as Authorization (only where CORS allows).

  3. Press Connect (Ctrl/⌘+Enter also works). Events appear in the log on the right, newest first. With EventSource, enter the event names to listen for if you want anything other than “message”.

  4. Select a log entry to read its body as text, formatted JSON or hex. The id and event type appear in the list. You can search and save the log as JSON Lines or text.

  5. To check without connecting, paste the body of a text/event-stream and press Split it.

What it does

Connects straight from your browser

Connecting and receiving happen only between your browser and the other server. This site’s server neither relays nor stores the traffic. Opening the page does not connect; only pressing Connect does.

EventSource or a fetch stream

EventSource is the browser’s built-in way and cannot set headers. Reading with a fetch stream lets you set headers such as Authorization and Last-Event-ID. It works only where CORS allows it, and some headers trigger a preflight first.

Parsed as the WHATWG specification says

The tool parses event, id, retry, data and comments itself, following how the HTML Standard interprets an event stream (CRLF, LF and CR line ends, the BOM, joining several data lines, dispatching at an empty line, dropping an unfinished event at the end). Pasted text goes through the same code.

Search, format and save the log

Up to 2,000 events and about 50 MB in total are logged. Filter by event name or body, read JSON formatted, and save as JSON Lines or text.

Causes of a failed connection, in order

CORS, the response status and Content-Type, mixed content, the header limits and proxy buffering, in that order.

Use cases

  • Check that an SSE endpoint in development returns the event, id and data you expect
  • Narrow down why EventSource cannot receive (CORS, Content-Type, status)
  • Read an SSE endpoint that needs an Authorization header with a fetch stream
  • Try a reconnect with Last-Event-ID to see whether the server resumes from there
  • Split an event-stream text taken with curl into event, id and data as the specification says

Supported formats

Input

An SSE URL (http or https)Pasted text/event-stream text (up to 1 MB)With the fetch stream: Authorization, other headers and Last-Event-ID

Capability matrix

FeatureSupportNotes
Connect with EventSource and log event, id and dataSupported—
Connect with a fetch stream (add Authorization and other headers, Last-Event-ID)SupportedOnly where CORS allows it
Split into event, id, retry, data and comments (as specified)Supported—
Split a pasted event-stream textSupportedNo connection is made
Automatic reconnect after a dropPartialOff by default. When on, it has a limit of 1 to 10 attempts
Setting headers (such as Authorization) with EventSourceNot supportedThe browser’s EventSource cannot set headers. Use the fetch stream
Showing retry and comments received through EventSourceNot supportedEventSource does not hand them to the page. The fetch stream or the pasted-text split shows them
SSE with POST or other non-GET methodsNot supportedGET only
Connecting to servers your browser cannot reachNot supportedThis site’s server does not relay

Limits & notes

  • One data value is cut at 1 MB (the original length is shown in the log). A line longer than 1 MB with no line break is dropped. Pasted text is limited to 1 MB.
  • The log keeps the newest 2,000 events and about 50 MB in total, dropping the oldest first. The list shows the newest 300.
  • A connection is stopped after 60 minutes. The fetch stream also stops after receiving more than 256 MB.
  • Automatic reconnect is off by default. Even with EventSource, if you do not turn it on, the connection is closed at the first drop (the browser’s built-in reconnect is not used).
  • The URL can be up to 2,000 characters and cannot contain a user name or password. Up to 20 headers. Headers the browser sets itself (Cookie, Host, Origin, Sec-* …) cannot be added.
  • Only the URL (without query and fragment), the way of reading, the event names and the reconnect settings are saved. Authorization, headers and Last-Event-ID are not.
  • While this page is https, an http:// address cannot be reached (except in browsers that let localhost through).

Privacy & safety

The only server contacted is the one at the URL you enter. Traffic goes straight from your browser to it; this site’s server neither relays nor stores it. The Authorization value and headers are not saved and not written to the log. The log disappears when you close the page.

FAQ

Can I add an Authorization header to EventSource?
No. The browser’s EventSource cannot set headers. If you authenticate with a cookie, use “Send credentials” (withCredentials). If you need a header, read the endpoint with this tool’s fetch stream — the server must allow that header through CORS.
Why can’t EventSource connect?
The usual three: CORS blocks it, the response is not 200, or the Content-Type is not text/event-stream. The browser does not show the reason to the page, only in the developer console. Go through “If it does not connect” from the top.
What is Last-Event-ID?
It is the last value the server sent with id:. On reconnect, EventSource sends it in the Last-Event-ID header so the server can resume from there. With the fetch stream you can enter an initial value and try it from the first request.
What is retry?
A line in which the server says how many milliseconds to wait before reconnecting (retry: 3000). Only a value of digits is accepted. EventSource does not hand the value to the page, so use the fetch stream or the pasted-text split to see it.
Why do events arrive late and in bursts?
A reverse proxy or CDN may hold the response back before sending it (buffering). Check the proxy’s buffering setting, and check that the server ends each event with an empty line.
How is this different from the WebSocket client or CORS Studio?
SSE is a one-way stream from the server to the browser. To send messages both ways, use the WebSocket client; to find out why CORS fails, use CORS Studio.

Last updated: