All Tools View Categories About Contact Privacy

CSV to Log Converter

Turn CSV log exports back into readable text lines — map columns, keep the rest as key=value, render any style.

Runs entirely in your browser — logs never leave this page.
Placeholders: {ts} {level} {category} {message} {fields}

About CSV to Log Converter

CSV is the universal exchange format for log analysis — every BI tool, auditor and analytics export hands you a table. But when you need to send that data back into a log pipeline, replay events into a test harness, or simply read rows in a terminal, a table of columns is not a log. CSV to Log Converter reverses the pipeline: it takes CSV rows and renders each one back into a greppable text line, entirely in your browser.

The parser handles the real-world mess of CSV: comma, semicolon or tab separators, quoted cells with embedded separators, embedded quotes and embedded newlines inside a single cell, and both header and headerless layouts. With a header row, columns are read by name; without one, you flip off the header switch and either let columns default to col1, col2… or type your own comma-separated labels. Rows with ragged column counts (a trailing field missing here and there, common in hand-edited exports) don’t break the parser — missing cells simply come through as empty strings.

You map which columns carry the timestamp, level, category and message using dropdowns that are populated from your actual column names — no need to remember or retype them — and the converter also guesses sensible defaults by checking common names like ts/timestamp/@timestamp, level/severity/lvl, category/logger/service, and message/msg/event. If a column genuinely shouldn’t map to any of the four core fields, choosing (none) in its dropdown excludes it — the converter won’t silently substitute an auto-detected column back in. Any column not mapped to timestamp, level, category or message is appended to the line automatically as key=value, so nothing in the original row is lost even if you only mapped a couple of fields.

Output matches the style you need: classic bracket lines like [2026-08-15 09:12:33] [ERROR] [api] message, plain space-separated lines, flat key=value lines that keep every column visible, or a fully custom template built from {ts}, {level}, {category}, {message} and {fields} placeholders for matching whatever format a downstream tool expects. Levels are normalized against common aliases (warningwarn, errerror, critical/critfatal, and so on) and can be uppercased for output; unrecognized values pass through unchanged rather than being dropped. Timestamps can stay exactly as they were in the CSV, or convert to ISO 8601 UTC or a compact YYYY-MM-DD HH:MM:SS form — values that don’t parse as valid dates are left untouched instead of turning into “Invalid Date”.

Features

  • Robust CSV parsing: comma, semicolon or tab separators with correct quoted-field handling, including embedded commas, quotes and newlines.
  • Ragged-row tolerant: missing trailing cells become empty strings instead of breaking the conversion.
  • Header or headerless: columns identified by name, or by position with a label editor for headerless exports.
  • Auto column mapping: timestamp, level, category and message detected from common column-name aliases.
  • Manual override: selectors are populated from your real column names, and choosing “(none)” actually excludes a field rather than reverting to auto-detection.
  • Bracket output: [ts] [LEVEL] [category] message lines like classic log frameworks.
  • Plain output: simple ts LEVEL category message text lines.
  • Key=value output: flat lines that keep every column visible and greppable.
  • Custom template: compose lines with {ts} {level} {category} {message} {fields} placeholders.
  • Level normalization: common aliases collapsed to canonical names, with optional uppercasing.
  • Timestamp reformatting: keep original, or convert to ISO 8601 UTC or a compact date-time string, with invalid dates left as-is.
  • No data loss: every unmapped column is preserved as a key=value pair on the line.
  • Local processing: all conversion happens in your browser, nothing uploaded.

How to Use

  1. Paste your CSV. Drop comma, semicolon or tab-separated data into the input, or click Load sample to see a mixed, slightly ragged export.
  2. Set the separator. Match the file you pasted — comma, semicolon or tab — and toggle the header row if your data starts straight into values.
  3. Map columns. The converter auto-detects ts, level, category and message columns from common names; adjust any dropdown, or pick “(none)” to leave a field out entirely. For headerless files, fill in the column labels box instead.
  4. Pick an output style. Bracket, Plain, Key=value or Custom template, plus timestamp format and uppercase-level options.
  5. Convert. Every row becomes a log line, with remaining (unmapped) columns appended as key=value pairs, and a row/byte count shown below.
  6. Copy, download or print. Copy the result, download it as a .log file, or print it for a record.

Examples

Example 1 — Replaying an audit export. A compliance export is a CSV table of events. Map ts, level and message columns, pick Bracket output, and every audit event is restored to the log format the SIEM expects.

Example 2 — Feeding a test harness. A test fixture stores expected events as CSV. Convert the rows to plain log lines and feed them to the parser under test, comparing output line by line.

Example 3 — Headerless data. A legacy exporter omits headers. Turn the header switch off, set column labels in the label editor, and the rows render with meaningful key=value names instead of col1, col2.

Example 4 — Custom format for a tool. A monitoring script wants lines shaped like user_id={user_id} level={level} message={message}. Use the custom template and render each row exactly as the script parses them.

Example 5 — Merging separate columns. Your export splits date and time into two columns. Map the combined or time column as the timestamp, and every line gets a single, sortable timestamp instead of two separate fields.

Example 6 — Deliberately dropping a column. Your CSV has a category column you don’t want in the output at all. Select “(none)” in the Category col dropdown and it disappears from every line instead of reappearing on the next edit.

Benefits

  • Reverse the pipeline: tables turn back into the text logs systems and humans understand.
  • Messy CSV safe: quoted cells, embedded separators, ragged rows and headerless layouts all handled.
  • Column mapping made easy: dropdowns built from your real column names, with predictable “(none)” behavior.
  • No data loss: every unmapped column stays on the line as key=value.
  • Output flexibility: bracket, plain, key=value or a fully custom template.
  • Consistent levels and timestamps: normalized aliases and safe date reformatting, with graceful fallback on unparseable values.
  • Private by design: data is processed locally and never uploaded.

Frequently Asked Questions

How does this turn CSV rows into log lines?
Each CSV row is parsed into an object using the header row (or column indexes when there is no header). You map which columns hold the timestamp, level, category and message, then every row is rendered into a log-style text line. All remaining columns are appended as key=value pairs.
What separators are supported?
Comma, semicolon and tab. Quoted fields are handled correctly, including embedded commas, quotes and newlines inside a cell, so a messy Excel export still parses cleanly.
What if my CSV has no header row?
Turn the header switch off and columns are referenced by position: the first column becomes ts, the second level, and so on, with a simple label editor to name the rest. You can also keep using the same column selectors — they map by index.
Which output styles are available?
Bracket format like [2026-08-15 09:12:33] [ERROR] [api] message, plain timestamp LEVEL category message lines, key=value lines that keep every column, or a custom template using {ts}, {level}, {category}, {message} and {fields} placeholders.
How are levels normalized?
Levels are matched against common names (debug, info, warn, warning, error, err, fatal, critical, crit, notice, trace) and can be uppercased for output. Unknown values pass through unchanged.
Is my data uploaded?
No. Everything runs locally in your browser; nothing is sent to a server, stored or logged.