Tools

LLM SSE stream decoder

Paste a raw streaming response from OpenAI, Anthropic, Gemini or any OpenAI-compatible API and get back the full text, tool calls, reasoning and token usage.

Runs in your browserAI developer tools11.2K
Free

Input

0 B

Result

The result will appear here.

When a streaming LLM call misbehaves, what you usually have is a log full of data: lines — hundreds of small JSON fragments that are painful to read. This tool puts them back together. It parses the event stream by the WHATWG rules that openai-node (openai/openai-node, Apache-2.0) and Anthropic's SDK implement, recognises the wire format of each event, and shows the assembled answer, the tool calls with their streamed arguments joined up, the finish reason, the model and the token usage.

How it works

  • It reads four formats: OpenAI Chat Completions and every API that copies it (DeepSeek, Qwen, Groq, vLLM, Ollama's /v1), OpenAI Responses, Anthropic Messages, and Gemini's streamGenerateContent.
  • Line endings in CR, LF or CRLF, multi-line data fields, comments such as : keep-alive and a missing final blank line are all handled as the standard requires.
  • Reasoning — DeepSeek's reasoning_content, Anthropic's thinking deltas, Gemini's thought parts, OpenAI's reasoning summaries — is collected separately and shown above the answer when you turn it on.
  • Events that are not valid JSON are listed with their line numbers instead of stopping the decode, and a log that lost the blank lines between events is split back into separate events.

Where your data goes

Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.

This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.

What it costs

This tool is free, with no sign-in and no points.

Common questions

How do I capture a raw stream?
With curl, add -N (no buffering) to the request and copy what it prints. In a browser, the Network tab of the developer tools shows an EventStream view or the raw response of the request. In your own code, log each line before your SDK parses it.
Why does it say the stream is incomplete?
No finish reason arrived and there was no [DONE] or message_stop, so the connection probably dropped, timed out or was cut by a proxy before the model finished. Look for a stream error in the output, and check proxy and load-balancer timeouts, which often end long streams at 60 seconds.
Why is the token usage missing?
OpenAI's Chat Completions API only sends usage in a final chunk when the request sets stream_options: {"include_usage": true}; many compatible APIs do the same. Anthropic sends usage in message_start and message_delta, Gemini in usageMetadata, and the Responses API in response.completed, so those are shown whenever they are present.
What happens with n > 1 or several choices?
Only choice 0 is assembled. Requests that ask for several completions in one stream interleave them by index, and mixing them would produce nonsense; filter the lines of the other index out first if you need them.

The open-source behind it

This tool is a self-contained implementation. openai/openai-node (Apache-2.0) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.

openai/openai-node

Also known as

  • sse decoder
  • server-sent events parser
  • openai stream parser
  • decode streaming response
  • anthropic stream events
  • llm streaming debug