Developer Workflow
Convert Unix timestamps in API logs
Turn epoch seconds, milliseconds, and microseconds from API logs, webhooks, queues, databases, and incident timelines into readable UTC and local dates.
Problem
API logs and event payloads often mix 10-digit seconds, 13-digit milliseconds, and 16-digit microseconds. Reading those values by eye is impossible, and comparing UTC server logs with user screenshots can make incident timelines confusing.
When to use this
- A log line, webhook payload, queue event, or database row contains epoch timestamps instead of readable dates.
- You need to distinguish seconds, milliseconds, and microseconds before comparing events.
- A support ticket includes a local-time screenshot and you need to match it against UTC server logs.
Steps
- Step 1
Paste the copied log snippet
Paste the full log line or payload snippet instead of extracting values manually. The converter can find timestamp-like values inside surrounding text.
- Step 2
Review the detected units
Check whether each value was interpreted as seconds, milliseconds, or microseconds. Incorrect units are the most common source of wrong dates.
- Step 3
Compare UTC first
Use UTC for server logs, webhooks, database rows, and queue events so all backend systems are compared on the same timeline.
- Step 4
Use local time for user evidence
Switch to local time when matching a browser screenshot, customer report, or analytics event shown in the user's time zone.
Example
Convert mixed timestamp units from a webhook log
Input
created_at=1704067200 updated_at=1704067200123 processed_at=1704067200123456Output
1704067200 -> 2024-01-01T00:00:00.000Z (seconds)
1704067200123 -> 2024-01-01T00:00:00.123Z (milliseconds)
1704067200123456 -> 2024-01-01T00:00:00.123Z (microseconds)Common mistakes
Comparing local time to UTC logs
Keep backend analysis in UTC until you intentionally need to match a user's browser, screenshot, or support ticket.
Assuming every epoch value uses seconds
JavaScript and many APIs use milliseconds, while databases and tracing tools may export microseconds. Confirm the unit before drawing conclusions.
FAQ
How can I tell if a timestamp uses seconds or milliseconds?
Current-era Unix seconds are usually 10 digits, milliseconds are usually 13 digits, and microseconds are usually 16 digits.
Can I paste multiple log lines at once?
Yes. Paste copied logs, JSON fragments, or event payloads and the converter will extract timestamp-like values from the text.
Should incident timelines use UTC?
Yes for backend logs and distributed systems. Convert to local time only when matching user-visible evidence.