Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa. Supports seconds, milliseconds, ISO 8601, and every timezone. Free, no signup, runs entirely in your browser.
Last updated:
CommentsConvert Unix timestamps to human-readable dates (and vice versa) in seconds or milliseconds, in any timezone. Detection is automatic.
Current Time
Unix (seconds)
1787106300
Unix (ms)
1787106300420
ISO 8601
2026-08-19T02:25:00.420Z
UTC
Wed, 19 Aug 2026 02:25:00 GMT
Timestamp → Date
Date → Timestamp
What is Timestamp Converter?
A Unix timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment called the Unix epoch. Because it's a single number in UTC, it's the canonical way to represent 'a moment in time' in databases, logs, and APIs, immune to timezone and DST confusion.
How to convert Unix timestamps
- 1Paste a timestamp (10-digit seconds or 13-digit milliseconds) — the tool auto-detects the unit.
- 2The converted date is shown in UTC and in your local timezone.
- 3To go the other direction, pick a date/time in the calendar; the timestamp appears instantly.
- 4Switch timezone with the dropdown to see the same instant in different regions.
Use Cases
Debug 'stale token' errors
Decode `exp` and `iat` claims from JWTs, session cookies, or signed URLs to see if they're actually expired.
Read log timestamps
Cloud logs (AWS CloudWatch, Datadog, structured JSON logs) often store timestamps as epoch millis — paste them here to make sense of them.
Schedule cron / cron-like jobs
Convert a target run time in your local timezone to UTC epoch, then feed it into your scheduler.
Compare timestamps across services
When two systems disagree on 'now', dropping both timestamps here quickly reveals clock skew or timezone mistakes.
Code Examples
Current Unix timestamp in JS
// seconds
const s = Math.floor(Date.now() / 1000);
// milliseconds
const ms = Date.now();
// from timestamp
const d = new Date(s * 1000);Unix timestamp in Python
import time, datetime
s = int(time.time()) # seconds
ms = int(time.time() * 1000) # milliseconds
d = datetime.datetime.fromtimestamp(s)Unix timestamp in Go
import "time"
s := time.Now().Unix()
ms := time.Now().UnixMilli()
t := time.Unix(s, 0)Unix timestamp in SQL
-- PostgreSQL
SELECT EXTRACT(EPOCH FROM NOW())::bigint;
-- MySQL
SELECT UNIX_TIMESTAMP();
SELECT FROM_UNIXTIME(1700000000);Key Concepts
- Epoch
- The reference point from which time is measured. Unix epoch is 1970-01-01 00:00:00 UTC; other systems use different epochs (Windows FILETIME: 1601, NTP: 1900).
- Seconds vs milliseconds
- 10-digit numbers are seconds; 13-digit numbers are milliseconds. Rule of thumb: JavaScript uses ms (`Date.now()`), most other languages use seconds by default.
- ISO 8601
- A human- and machine-readable date format (`2024-01-15T12:30:45Z`). Preferred for APIs because it's timezone-explicit.
- Year 2038 problem
- 32-bit signed epoch overflows on 2038-01-19 03:14:07 UTC. Modern systems use 64-bit timestamps and are fine until year 292 billion.
Tips & Best Practices
- ▸Always store timestamps in UTC. Convert to local time only at the presentation layer.
- ▸In JavaScript, `Date.now()` returns milliseconds; the Unix convention is seconds. Divide by 1000 when talking to non-JS systems.
- ▸JWT `exp` and `iat` are always in seconds, per RFC 7519. Passing milliseconds is a common bug.
- ▸Never do timezone math manually. Use `date-fns-tz`, `luxon`, `dayjs/plugin/timezone`, or Python `zoneinfo` — DST rules change and manual offsets go stale.
Frequently Asked Questions
What is a Unix timestamp?
A Unix timestamp is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970 (the Unix epoch), excluding leap seconds.
Does the tool detect seconds vs milliseconds automatically?
Yes. Timestamps with 13 digits are treated as milliseconds; 10 digits are treated as seconds. You can also switch manually.
How do I get the current Unix timestamp?
In JavaScript: Math.floor(Date.now() / 1000) for seconds, or Date.now() for milliseconds. In Python: int(time.time()). This tool also shows the live current epoch time at the top so you can copy it directly.
Try Next
Date Diff
Calculate the exact duration between two dates in years, months, and days, plus total weeks / days / hours / minutes and business days. Optional time-of-day precision. 100% local.
Related Tools
Cron Parser
Parse and explain cron expressions in plain English. See the next 5 upcoming run times for any schedule.
Cron Generator
Build cron expressions from a friendly UI — every N minutes, daily at HH:MM, weekdays only, weekly, monthly, yearly. Preview the next 5 runs and a plain-English description. 100% local.
ISO 8601 Duration
Parse ISO 8601 duration strings (P3Y6M4DT12H30M5S, PT1H30M, P2W) into human-readable form, or convert total seconds into a canonical ISO 8601 duration. 100% local — used by REST APIs, video metadata, and scheduling systems.
Timezone Converter
Convert any date and time between IANA time zones — UTC to EST, PST to Tokyo, Sydney to London. Correct DST handling, compare multiple zones side-by-side. 100% local.
Working Days
Count business (working) days between two dates. Customize your workweek (M-F, M-Sat, custom) and paste a list of holidays to exclude them. Also shows total days, weekend days, and calendar span. 100% local.
Age Calculator
Calculate your exact age in years, months, and days from a date of birth. Shows total weeks, days, hours, and minutes lived, plus the countdown to your next birthday. 100% local — nothing uploaded.