# Log Sequence Diagram Converter

Convert structured service logs into Mermaid or PlantUML sequence diagrams, with optional latency and error annotations

> Canonical page: https://elysiatools.com/en/tools/log-sequence-diagram-converter

- **Category:** Development

- **Keywords:** logs, sequence diagram, mermaid, plantuml, service trace, microservices

## Overview

Paste JSON lines or trace-style text logs, or upload a log file. The tool first parses interaction-like events such as serviceA -> serviceB or structured JSON with source / target / action fields, then generates a sequence diagram in Mermaid or PlantUML.

How to use it:
- Log Input / Log File: provide logs that contain cross-service interaction hints
- Diagram Format: choose Mermaid or PlantUML
- Include Latency Notes: adds per-step latency markers where available
- Highlight Errors: annotates failing steps with error notes
- Max Steps: compresses the output so the diagram stays readable

Supported patterns:
- JSON lines with fields like source, target, action, status, latencyMs, error
- arrow logs such as api -> auth POST /login | status=401 | latency=82ms
- trace-style lines such as [api] GET /users -> [db] 200 14ms

Output:
- compact interaction summary
- Mermaid or PlantUML sequence diagram source
- AI-assisted summarization when possible, with heuristic fallback when AI is unavailable

## Inputs

- **Log Input** (textarea): 2026-04-06T10:00:01Z api -> auth POST /login | status=401 | latency=82ms | error=invalid token
- **Log File** (file)
- **Diagram Format** (select)
- **Include Latency Notes** (checkbox)
- **Highlight Errors** (checkbox)
- **Max Steps** (number)

## When to use

- When debugging failed requests across multiple microservices to pinpoint exactly where an error occurred.
- When documenting system architecture and API interactions based on real production traffic logs.
- When analyzing performance bottlenecks by visualizing service hops and step-by-step latency.

## How it works

- Paste your structured logs (JSON lines, arrow logs, or trace-style text) or upload a .log or .jsonl file.
- Select your preferred diagram format (Mermaid or PlantUML) and configure options like latency notes and error highlighting.
- Set a maximum step count to compress the output and ensure the diagram remains readable.
- The tool parses the source, target, and action fields to generate a compact interaction summary and the corresponding diagram source code.

## Use cases

- Visualizing a complex authentication flow trace to identify a 401 Unauthorized error source.
- Generating up-to-date sequence diagrams for technical documentation directly from staging environment logs.
- Mapping database query latency across different backend services to find slow API endpoints.

## Frequently asked questions

### What log formats are supported?

The tool supports JSON lines with source/target fields, arrow-style logs (e.g., api -> auth), and trace-style text logs.

### Can I limit the size of the generated diagram?

Yes, you can set a 'Max Steps' limit (between 3 and 40) to compress the output and ensure the sequence diagram remains readable.

### How are errors displayed in the diagram?

If you enable 'Highlight Errors', the tool annotates failing steps with specific error notes directly on the sequence diagram.

### Does it support PlantUML?

Yes, you can choose between Mermaid and PlantUML as your output diagram format.

### Can I upload a log file instead of pasting text?

Yes, you can upload .log, .txt, .json, or .jsonl files up to 20MB.

## Related tools

- [Data URI Generator](https://elysiatools.com/en/tools/data-uri-generator): Convert files into Data URIs (Base64 or percent-encoded) for inlining images, fonts, and assets directly into HTML, CSS, or Markdown
- [Encrypted PDF Converter](https://elysiatools.com/en/tools/encrypted-pdf-converter): Open password-protected PDFs with OpenDataLoader and export them as Markdown, JSON, or text once the correct password is provided
- [Fitness Workout PDF Generator](https://elysiatools.com/en/tools/fitness-workout-pdf-generator): Generate a printable workout-plan PDF from JSON or CSV data with exercise tables, progress boxes, and optional QR video links
- [JSON-LD Generator from CSV](https://elysiatools.com/en/tools/json-ld-generator-from-csv): Turn CSV or Excel rows into Schema.org JSON-LD for articles, products, or events, with validation-ready output for SEO workflows
- [Train/Test Split with Stratification](https://elysiatools.com/en/tools/train-test-split-with-stratification): Class-stratified train/validation/test split or stratified k-fold for CSV/JSON datasets — seeded, reproducible, with distribution reports, leakage checks, SMOTE preview and CSV export.
- [ICS Calendar Recurrence Rule Expander](https://elysiatools.com/en/tools/ics-calendar-recurrence-rule-expander): Expand RRULE-based VEVENT recurrence into concrete occurrences and export them as JSON or a flattened ICS calendar
- [Podcast Chapter Marker Builder](https://elysiatools.com/en/tools/podcast-chapter-marker-builder): Build every podcast chapter format from one timecoded list: Podcasting 2.0 JSON + RSS tag, ID3v2.4 CHAP+CTOC burned into an MP3, Vorbis comments, mp4chaps, YouTube timestamps and SRT, with a per-player support matrix.
- [Rich Text JSON to PDF](https://elysiatools.com/en/tools/richtext-json-to-pdf): Convert TipTap, Quill, or Slate JSON exports into a styled PDF document

## Samples

- [Distributed Tracing Samples](https://elysiatools.com/en/samples/distributed-tracing-samples): Comprehensive distributed tracing examples using Jaeger, OpenTelemetry, and other modern observability tools for microservices architecture
- [Hex/Unicode Encoding Format Samples](https://elysiatools.com/en/samples/text-hex-unicode-formats): Examples of hex (\xXX) and unicode (\uXXXX) escape sequence encoding formats
- [JWT Samples](https://elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations
- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10

## Related content

- [Observability, Log Analysis, and Trace Debugging Tools](https://elysiatools.com/en/hubs/observability-debugging): Parse logs, inspect traces, compare API payload drift, and turn raw observability data into timelines, diagrams, and structured evidence for faster debugging.
- [Structural and Logic Diagram Generators](https://elysiatools.com/en/hubs/structural-and-logic-diagram-generators): Generate flowcharts, mind maps, org charts, tree diagrams, Venn diagrams, ASCII directory trees, and sequence diagrams from text, JSON, or logs — for planning, documentation, and engineering reviews.
- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [Text Case, Encoding, and Normalization Conversion Tools](https://elysiatools.com/en/hubs/text-convert): Compare text case conversion, character-width conversion, encoding conversion, quoted-printable handling, and inline text normalization tools in one hub.
