DevKits

SSE Stream Parser — Reassemble OpenAI / Anthropic Streaming Responses

Paste a raw server-sent events (SSE) stream from the OpenAI or Anthropic API and reconstruct the full message text, tool-call arguments, and token usage. Great for debugging streaming responses. 100% local.

Last updated:

Comments

Paste the raw SSE body from an OpenAI or Anthropic streaming response and this tool concatenates every delta back into the full message text, rebuilds tool-call arguments, and surfaces token usage. The format is auto-detected. Everything runs in your browser.

Format: OpenAI (Chat Completions)Events: 4Finish: stop
Reassembled text
Hello, world!
Usage
{
  "prompt_tokens": 9,
  "completion_tokens": 3,
  "total_tokens": 12
}

Parsing runs entirely in your browser — the stream is never uploaded. OpenAI and Anthropic formats are auto-detected.

What is SSE Stream Parser?

When you call an LLM with stream: true, the server replies with server-sent events (SSE): many small `data:` lines, each carrying a delta — a few characters of text or a fragment of a tool call's JSON arguments. Reading that raw stream by hand is painful, especially when debugging a truncated response or a malformed tool call. This parser handles both major dialects: OpenAI's choices[].delta.content chunks terminated by data: [DONE], and Anthropic's typed events (message_start, content_block_delta with text_delta or input_json_delta, message_stop). It reassembles the complete assistant text, stitches each tool call's argument fragments back together, and reports the finish reason and any usage numbers — so you can see exactly what the model produced.

How to parse an SSE stream

  1. 1Copy the raw streaming response body (the data: lines) from your logs or network tab.
  2. 2Paste it in — the OpenAI vs Anthropic format is detected automatically.
  3. 3Read the reassembled text, tool-call arguments, finish reason, and usage.

Key Concepts

delta
The incremental piece of content in one streaming chunk; clients concatenate deltas.
data: [DONE]
OpenAI's sentinel marking the end of the stream.
input_json_delta
Anthropic's event type carrying a fragment of a tool call's JSON arguments.

Frequently Asked Questions

What format does a streaming LLM response use?

Server-sent events (SSE): a sequence of lines like `data: {JSON}` separated by blank lines, ending with `data: [DONE]` for OpenAI. Each event carries a small delta — a few characters of text or a slice of a tool-call's arguments — that the client concatenates.

How are OpenAI and Anthropic streams different?

OpenAI sends choices[].delta.content chunks and ends with data: [DONE]. Anthropic sends typed events (message_start, content_block_delta with text_delta or input_json_delta, message_stop). This parser auto-detects which one you pasted and reassembles accordingly.

Can it rebuild tool / function call arguments?

Yes. Tool-call arguments are streamed as JSON fragments across many chunks; the parser concatenates them back into the complete arguments string for each tool call.

Is my stream uploaded?

No. Parsing happens entirely in your browser — the response never leaves your device.

Try Next

Text Chunker

Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.

Related Tools

Reference & Guides