Timestamp Converter
Paste a Unix epoch (seconds, millis, micros, or nanos), an ISO / date string, now, or a relative value like now-2h, and get every representation: epoch s/ms, ISO-8601 UTC, RFC 2822, local time, your chosen timezone, and relative "time ago". The unit is auto-detected (with ambiguity notes). The DB formats and Timezones tabs add database literals and the same instant across common zones. Runs in your browser.
Auto-converts as you type. Ctrl+Enter to re-run.
Guide & FAQ
Convert Unix epoch timestamps in seconds, milliseconds, microseconds, or nanoseconds into human-readable UTC and local dates, or convert a date back to a Unix value. Supports ISO 8601 strings (2026-05-13T10:30:00Z) in both directions, auto-detects the input unit, and shows the same instant in UTC, local, and any chosen timezone. Useful for debugging logs, APIs, database records, JWT claims, and audit trails. Runs locally; no upload.
What it does
- Converts Unix epoch in seconds, milliseconds (JS / Java), microseconds, or nanoseconds (Go / Linux
clock_gettime). - Auto-detects which unit you pasted based on digit count.
- Parses and emits ISO 8601 (
2026-05-13T10:30:00Z) and RFC 3339. - Displays the same instant in UTC, local time, and a chosen timezone.
- Shows relative time (e.g., "2 hours ago", "in 5 days") for sanity-checking.
- Convert dates to epoch for use in
WHEREclauses, log searches, and API parameters.
When to use it
- Decode a timestamp pulled from a log line or database row.
- Convert a JWT
exporiatclaim to a real time. - Build a date filter for a SQL query (
WHERE created_at > ...). - Confirm an API response timestamp matches the expected window.
- Translate between Postgres microseconds and JavaScript milliseconds.
- Spot-check Stripe / GitHub / AWS event timestamps.
How to use it
- Paste a Unix timestamp or an ISO 8601 date string.
- The tool auto-detects the unit; override if needed (seconds vs milliseconds matter).
- Read off UTC, local time, and your chosen timezone; copy in the format you need.
- For date → epoch, pick the date / time and copy the value in the unit you need.
- For date math (add days, find a window), open the Timezone & Date Math Calculator.
Tips & pitfalls
- Seconds vs milliseconds is the #1 source of off-by-1000 bugs. 10-digit = seconds, 13-digit = milliseconds.
- JWT
expandiatare always in seconds, not milliseconds. - JavaScript
Date.now()returns milliseconds; Pythontime.time()returns seconds (float). - Postgres often stores microseconds via
timestamptz; MySQL stores seconds by default. - Always confirm whether a stored time is UTC or local — most production systems should be UTC.
- Don't trust client clocks for security-sensitive comparisons — use server time.
FAQ
FAQ
- What is a Unix timestamp? The number of seconds (or milliseconds) since 1970-01-01 UTC, called the Unix epoch.
- How do I know if a timestamp is in seconds or milliseconds? Roughly: 10 digits = seconds, 13 digits = milliseconds. The tool auto-detects.
- How do I convert ISO 8601 to a Unix timestamp? Paste the ISO string — the tool emits the epoch value in your chosen unit.
- Is my input uploaded? No. Conversion runs in your browser using
DateandIntl.DateTimeFormat. - Why does the local time differ from UTC? Local time depends on your machine's timezone. The tool shows UTC and local side by side so you can compare.
- Does it handle leap seconds? Unix time ignores leap seconds by convention. The tool matches that behavior.
- How do I convert epoch milliseconds to a date? Paste the 13-digit millisecond value and the tool auto-detects milliseconds and shows the UTC and local date/time. Use the unit selector to override if needed.
- How do I convert a date to a Unix timestamp? Enter or pick a date/time and the tool emits the epoch value in seconds, milliseconds, microseconds, or nanoseconds.
Related guides
Runs locally in your browser. No uploads. Always store and transmit timestamps in UTC for cross-region apps.