# Parse a Raw SSE Stream from an LLM API

> Paste a raw server-sent-event stream and get the reconstructed message, tool calls, usage and stop reason.

This parser reads a raw server-sent-event stream from a language-model API and reconstructs what it produced: the full message text, any thinking blocks, every tool call with its accumulated arguments, the token usage and the stop reason. It handles the Anthropic, OpenAI and Gemini wire formats, and flags tool arguments that never finished streaming — the usual cause of a JSON parse failure in production.

**URL:** https://convertto.tech/t/llm-stream-parser
**Category:** AI & LLM Tools (https://convertto.tech/c/ai-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your raw stream.
2. Choose the wire format.
3. Turn "List every event" on or off as needed.
4. Press Run, then download the result when it is ready.

## FAQ

### Why do my tool-call arguments fail to parse?

Because they arrive as fragments across many frames and only form valid JSON once the last one lands. If the stream was cut short — a timeout, a dropped connection, a truncated log — the accumulated string is a partial object. This parser reassembles the fragments and tells you whether the result actually parses.

### Is the stream sent anywhere?

No. Parsing happens in your browser, which matters because a raw stream from your own logs often contains the prompt, the system message and identifiers.

## Sources

- [WHATWG — Server-sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html) — WHATWG

## Related tools

- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
- [Context Window Calculator](https://convertto.tech/t/context-window-calculator): Paste a document and see which models it fits inside, how much of each window it fills, and what is left for the reply.
- [LLM Model Comparison](https://convertto.tech/t/llm-model-comparison): Every current model side by side: price per million tokens, context window, max output, modalities and cache rates.
- [LLM Token Counter](https://convertto.tech/t/llm-token-counter): Count tokens with the real BPE vocabulary, see every token coloured in place, and compare the count across models.
- [Prompt Injection Sanitizer](https://convertto.tech/t/prompt-injection-sanitizer): Strip invisible carriers, neutralise instruction-like markup and fence untrusted content before you paste it into a prompt.
- [Prompt Template Generator](https://convertto.tech/t/prompt-template-generator): Write a prompt once with placeholders, paste rows of data, and get every filled prompt back with its token count and cost.
- [Temperature & Top-p Visualizer](https://convertto.tech/t/temperature-top-p-visualizer): Watch sampling parameters change which tokens can actually be chosen, on a real softmax over logits you supply.
- [Words to Tokens Converter](https://convertto.tech/t/words-to-tokens-converter): Convert between words, characters, pages and tokens using measured ratios for prose, code, JSON and CJK.
