What this Unix timestamp converter does
Unix time — sometimes called POSIX timestamp or epoch time — counts seconds elapsed since 1970-01-01 00:00:00 UTC. It's the lingua franca of backends, databases, and APIs worldwide. This English-language converter takes any epoch value (10-digit seconds or 13-digit milliseconds) and outputs ISO 8601, UTC, local time, and a human-readable relative label all at once, with one-click copy for each. According to the Stack Overflow Developer Survey 2024, ISO 8601 is the most preferred date format among developers — and for good reason: it sorts lexicographically and removes ambiguity across locales. Everything runs locally via the native JS Date object — 100% client-side, your data never leaves your browser. No uploads, no tracking, no server logs.
Features
- Auto-detect seconds vs milliseconds. Paste any epoch and the tool checks digit count: 10 digits → seconds, 13 digits → milliseconds. No manual toggle needed.
- UTC and local time side by side. Seeing both simultaneously is the fastest way to catch timezone bugs — a server logging in UTC while your app displays local time is a classic mismatch.
- ISO 8601 output. Returns a fully qualified ISO 8601 string (e.g. 2024-03-15T14:30:00.000Z) that you can drop straight into API payloads or database inserts.
- Relative time label. Shows how far the timestamp is from now — "3 days ago" or "in 2 hours" — useful for quickly validating JWT
expclaims or cache TTLs without mental arithmetic. - Now button. Fills the epoch field with the current timestamp in one click, so you can confirm the current epoch seconds or use it as a baseline for duration math. Need to add or subtract days? The [date calculator](/en/date-calculator/) covers that.
- Reverse conversion. Paste an ISO, RFC 2822, or any JS-parseable date string and get back the epoch in both seconds and milliseconds instantly.
How to use the Unix timestamp converter
Paste an epoch or a date string — the tool converts in real time. Use the Now button to start from the current moment.
- Get an epoch value. Grab one from your logs, API response, or run
date +%sin a terminal (Linux/macOS). In JavaScript,Date.now() / 1000gives you the current epoch in seconds. - Paste it into the epoch field. The tool detects whether it's seconds (10 digits) or milliseconds (13 digits) automatically and fills all output fields.
- Read UTC and local time. Compare both rows to confirm your app is handling the timezone you expect. A timestamp that looks right in Chicago may be off by a day when read in Sydney.
- Copy the format you need. Hit the Copy button next to ISO 8601, epoch seconds, or epoch milliseconds to paste it directly into your code, query, or ticket.
- Convert a date string back to epoch. Type or paste any ISO or human-readable date into the date field and get the epoch equivalent — handy when constructing a SQL
WHERE created_at > ?filter.
Common use cases
- Validating JWT claims. The
expandiatfields in a JSON Web Token (as defined in RFC 7519) are epoch seconds, butDate.now()returns milliseconds — a mismatch that causes silent auth failures. Paste the claim value here to confirm the human-readable expiry before wasting time in a debugger. - Debugging API and database logs. Production logs often land as raw epoch milliseconds. Convert them to ISO 8601 for correlation across services, or check whether a Postgres
TIMESTAMP WITHOUT TIME ZONEcolumn silently dropped the timezone offset. - Checking MySQL TIMESTAMP boundaries. MySQL's TIMESTAMP type overflows on 2038-01-19 03:14:07 UTC — the Year 2038 problem. If your schema stores expiry dates or scheduled jobs, paste a far-future epoch here to confirm it falls within the safe range before it hits production.
- Calculating event durations. Subtract two epoch values and you have an exact duration in seconds. For more complex date arithmetic — adding weeks or finding the difference in calendar days — the [time calculator](/en/time-calculator/) is a natural next step.
- Scheduled job and cron auditing. When reviewing a next-run timestamp from a job queue, converting it to local time tells you at a glance whether it fires at 3 AM or 3 PM. If you're also parsing the schedule expression itself, check the [cron expression parser](/en/cron-parser/).
Frequently asked questions
Does this tool send my timestamps to a server?
No. All conversion logic runs in your browser using the native JavaScript Date object. Nothing is uploaded or logged — 100% client-side.
What's the difference between epoch seconds and epoch milliseconds?
Epoch seconds (10 digits, e.g. 1714000000) count whole seconds since 1970-01-01 UTC. Epoch milliseconds (13 digits, e.g. 1714000000000) are used by JavaScript's Date.now() and most browser APIs. The tool detects the format automatically by digit count, but you can always check: if dividing by 1000 gives a plausible year, you have milliseconds.
Why does the same epoch show different dates in UTC vs local time?
Epoch is always UTC-based. When your machine's timezone is behind UTC — for example America/Toronto is UTC−5 in winter — the local display shifts accordingly. This side-by-side view helps you spot when a log entry was actually written relative to business hours.
What is the Unix epoch, exactly?
Unix epoch time counts non-leap seconds elapsed since the Unix epoch: midnight on January 1, 1970, Coordinated Universal Time (UTC). It was standardized as part of POSIX and is the basis for timestamps in virtually every operating system, database, and network protocol today. U.S. federal IT systems have been actively working on Year 2038 mitigation since the early 2020s to extend beyond the 32-bit signed integer ceiling.
Why do JWT tokens sometimes expire immediately or seem far in the future?
The exp claim defined in RFC 7519 is in epoch *seconds*, but many developers inadvertently set it using Date.now() (which is milliseconds), producing an expiry 1000× too large. Paste the raw exp value into the epoch field here — if the ISO output is in the year 33000+, that's the bug.
How do I get the current epoch in different languages?
In JavaScript: Math.floor(Date.now() / 1000) for seconds. In Python: import time; int(time.time()). In Bash: date +%s. The Now button in this tool also copies the current epoch if you just need a quick value.