Unix Timestamp Converter
Convert between Unix epoch timestamps and human-readable dates instantly. Auto-detects whether your input is in seconds or milliseconds based on magnitude. Outputs multiple formats including Unix seconds, Unix milliseconds, ISO 8601 (UTC and local), human-readable strings, and relative time calculations. The "Use current time" shortcut lets you work with the present moment.
What does this tool do?
The Timestamp Converter translates between machine-readable Unix timestamps and human date formats. Unix timestamps count seconds (or milliseconds) since January 1, 1970 00:00:00 UTC (the Unix epoch). The tool auto-detects seconds vs milliseconds: numbers below 10^11 are treated as seconds (dates before year 5138), above as milliseconds. It outputs comprehensive format options: Unix seconds, Unix milliseconds, ISO 8601 UTC timestamp, ISO 8601 local time, human-readable date string, and relative time from now.
How it works
Input is parsed to detect format: numeric values are analyzed for magnitude to determine seconds vs milliseconds; string values are parsed as date inputs. JavaScript's Date object handles conversion: new Date(timestamp * 1000) for seconds, new Date(timestamp) for milliseconds. Output formatting uses toISOString() for ISO 8601, toLocaleString() for local time, and custom formatting for human-readable strings. Relative time calculates the difference between the timestamp and now using Date.now(), displaying appropriate units (seconds ago, minutes ago, hours ago, days ago).
Features
- Accepts seconds, milliseconds, or parseable date strings
- Auto-detects seconds vs milliseconds
- Outputs: Unix seconds, Unix ms, ISO 8601 (UTC), ISO 8601 (local), human date, relative time
- "Use current time" shortcut button
- Copy any field with one click
- Handles dates from 1970 to year 275760
- Browser timezone for local time display
How to use
- 1
Enter timestamp or date
Paste any of: 1234567890 (seconds), 1234567890000 (milliseconds), 2026-04-26T20:00:00Z (ISO), or "April 26 2026 8pm" (natural language).
- 2
Read all conversions
All formats are displayed: Unix timestamps, ISO strings in UTC and your local timezone, readable format, and relative time from now.
- 3
Use current time shortcut
Click "Use Current Time" to populate with now. Useful for logging current timestamps or calculating future/past relative times.
- 4
Copy needed format
Click copy on whichever format you need for your code, API, database, or documentation.
Common use cases
API debugging
Convert Unix timestamps in API responses to human dates to understand data recency, expiration times, or event sequencing.
Database work
Translate database timestamps (often stored as Unix integers) to readable dates for queries, reports, and data verification.
Log analysis
Convert millisecond timestamps in log files to human-readable times for incident analysis and event correlation.
Code development
Generate timestamps for test data, verify your code's date handling produces correct values, and debug timezone issues.
Tips & best practices
- Unix timestamps are always UTC/GMT — the 'local' display is just for your convenience, the underlying value has no timezone
- 1 billion seconds is about 31.7 years — quick mental math: divide milliseconds by 1000 to get seconds before converting
- ISO 8601 format (2024-01-15T10:30:00Z) is unambiguous and sorts correctly as text — preferred for APIs and databases
- Relative time helps verify if a timestamp is recent ("2 hours ago") or old ("3 years ago") at a glance