All Tools View Categories About Contact Privacy

Log to JSON Converter

Turn raw log lines into structured JSON — timestamps, levels, key=value fields and embedded payloads, parsed automatically.

Runs entirely in your browser — logs never leave this page.

About Log to JSON Converter

Almost every system writes logs in a slightly different dialect. Bracket timestamps like [2026-08-15 09:12:33] [ERROR] [api], plain timestamp LEVEL category lines, key=value trails, embedded JSON payloads, syslog headers — a team that needs to feed all of it into a dashboard, an alerting rule or a search index has to turn text into structure first. Doing that by hand with regular expressions is slow, error-prone and impossible to repeat consistently across thousands of lines from several services at once.

Log to JSON Converter turns any batch of log lines into a clean JSON array (or JSONL) in one paste, entirely client-side. Each line is parsed into an object with ts, level, category, message and any extracted fields — types are preserved, so user_id=42 becomes the number 42 and active=true becomes the boolean true instead of quoted strings that break downstream comparisons. The parser auto-detects the dominant format per line, so a single paste can mix bracket-style, plain-style and JSON lines and still come out consistently structured; you can also pin a specific parser (Bracket, Plain, Key=value, JSONL or Syslog) when a feed is unusual enough to confuse detection.

Beyond the basic fields, the converter digs into the details that matter for real pipelines. It finds a timestamp anywhere in the line — regardless of surrounding brackets or separators — and normalizes it to a UTC ISO 8601 string, while lines with no recognizable timestamp simply omit the field instead of getting a guessed, wrong one. It extracts trailing key=value pairs into a structured fields object with automatic type detection (numbers, booleans, null, and strings for anything that does not cleanly parse as a number, like an IP address or a duration such as 24ms). It also recognizes embedded JSON payloads, such as a payload={"a":1} fragment inside an otherwise plain-text line, and lifts them into their own nested object rather than leaving them as unparsed text. Severity words like ERROR, WARN, INFO, DEBUG and their common synonyms (warning, err, critical/crit) are normalized to a consistent lowercase level, and bracketed logger or service names become the category field.

Any line that cannot be parsed at all — malformed JSON, a syslog line with no priority header, an empty result — is skipped and reported separately with its line number, so nothing is silently dropped from your dataset without you knowing. Pretty-printed output (2- or 4-space indent) is easiest to read while you are checking results; minified JSON keeps payload size down for large batches; JSONL, one JSON object per line, is the format most log shippers such as Logstash, Vector or Fluent Bit expect on ingest. Toggle Include raw line whenever you want to keep the original, untouched text alongside the parsed object for auditing or debugging a transformation. Everything — detection, parsing, timestamp normalization and formatting — runs locally in your browser; nothing is uploaded.

Features

  • Auto-detect parsing: bracket, plain, JSONL, key=value and syslog styles recognized automatically, per line.
  • Manual format pin: force one parser for a feed that confuses detection.
  • ISO timestamp normalization: timestamps anywhere in the line become UTC ISO 8601 strings; lines with no timestamp are left without one instead of a wrong guess.
  • Type-preserving fields: key=value pairs become real numbers, booleans, null and strings.
  • Embedded JSON support: payload={...} fragments inside a line become nested objects.
  • Level and category extraction: ERROR/WARN/INFO/DEBUG (and synonyms) and logger/service names pulled into their own keys.
  • Three outputs: pretty JSON array, minified array, or JSONL for shippers.
  • Indent control: 2-space or 4-space pretty printing.
  • Keep raw line: optional raw field preserves the original text for traceability.
  • Failure reporting: unparsable lines are listed by line number instead of silently vanishing.
  • Sample data: load a realistic multi-format feed in one click.

How to Use

  1. Paste your logs. Drop any number of log lines into the input box, or click Load sample to see a realistic multi-format feed.
  2. Choose the parser. Auto-detect handles most feeds; switch to Bracket, Plain, Key=value, JSONL or Syslog when you need to force a specific style for the whole paste.
  3. Set output options. Pick JSON array or JSONL, choose indentation, and decide whether to include the raw line, extract key=value fields, and normalize timestamps.
  4. Convert. The structured JSON appears instantly with a line, object and byte count, plus a list of any lines that could not be parsed.
  5. Copy or download. Copy to the clipboard, download the result (as .json for arrays or .jsonl for line-delimited output), or print to PDF.

Examples

Example 1 — Shipping to a log index. You are migrating to Elasticsearch or OpenSearch and need mixed application logs as JSON documents. Paste the bracketed and plain-format lines, let Auto-detect classify each one, and every entry becomes a document with ts, level, category and message fields ready for the indexer.

Example 2 — Key=value cleanup. An old app logs user_id=42 active=true plan=pro trailing on each message. The converter turns those pairs into real fields — 42 stays a number, true stays a boolean — so your analytics queries work without extra string parsing downstream.

Example 3 — JSONL for a log shipper. Vector or Fluent Bit ingest one JSON object per line. Choose JSONL output and the converter emits each parsed log as its own line, ready to pipe straight into the pipeline configuration.

Example 4 — Mixed microservice feed. A monorepo has services logging in two or three dialects. Auto-detect parses each line with the right parser, and the output array contains one clean, consistently-shaped object per line — no pre-splitting by service required.

Example 5 — Debugging a pipeline. A transformation further down the pipeline is dropping records. Keep raw lines enabled, compare the raw field with the parsed ts/level/message, and you can see exactly where a timestamp or level was misread before it reaches production.

Benefits

  • Stop hand-writing JSON: thousands of lines structured in one paste, no regular expressions to maintain.
  • Type fidelity: numbers and booleans survive instead of becoming strings that break comparisons.
  • Timestamp normalization: every date arrives in one consistent UTC ISO 8601 format.
  • Nested structure: key=value pairs and embedded JSON payloads become real, queryable fields.
  • Nothing silently dropped: lines that fail to parse are reported, not discarded.
  • Pipeline-ready output: JSONL for shippers, JSON array for analysis or archiving.
  • Private by design: logs are processed locally and never uploaded.

Frequently Asked Questions

What log formats can this convert to JSON?
Bracket formats like [2026-08-15 09:12:33] [ERROR] [api] message, plain timestamp LEVEL category lines, JSONL lines, key=value pairs and syslog-style lines. Auto-detect chooses the best parser per line, and a manual format selector is available for mixed feeds.
How are timestamps handled?
The converter finds the timestamp anywhere in the line, normalizes it to an ISO 8601 string (UTC) and keeps the original text in the raw field. Lines without a timestamp get a null ts field instead of a wrong guess.
Does it extract structured fields from key=value pairs?
Yes. After the message, embedded pairs like user_id=42 and ip=192.168.1.10 are extracted into a fields object with automatic type detection, so numbers stay numbers and booleans stay booleans.
What about logs that already contain JSON?
Embedded JSON payloads are detected and parsed into their own nested object, so a line like message payload {"a":1} becomes a structured field instead of text.
What output formats are available?
A pretty-printed JSON array (indent 2 or 4), a minified single-line JSON array, or JSONL where each line is one JSON object — ideal for log shipping pipelines like Logstash or Vector.
Can I keep the original line?
Yes. Toggle Include raw line to add a raw field with the untouched text. Useful when you need to trace the conversion back to the source.
Is my log data uploaded?
No. All parsing happens locally in your browser; nothing is sent to a server, stored or logged.