Developer
Encoders, converters & dev utilities
Epoch / Unix Timestamp Converter
Convert Unix timestamps ↔ dates — seconds/ms auto-detect, timezones & code snippets. Accurate, instant and free — for United States.
100% in-browser — nothing is uploaded
What these mean:
Seconds or milliseconds? The #1 epoch foot-gun
What a Unix timestamp is
A Unix timestamp (epoch or POSIX time) is the number of seconds since 1 January 1970 at 00:00:00 UTC, ignoring leap seconds. It is one absolute number that is the same all over the world — it carries no timezone. You turn it into a human date by rendering it in a chosen zone, usually UTC.
Epoch
The zero point
1970-01-01T00:00:00Z — where the count starts.
Seconds
The unit
A plain integer count of seconds (ms in many runtimes).
UTC
No timezone
Absolute worldwide; render it in any zone to display.
Seconds vs milliseconds, and timezones
Two things trip everyone up. First, the unit: classic Unix time is in seconds (10 digits today) but JavaScript, Java and many logs use milliseconds (13 digits). Second, the timezone: the number is UTC-absolute, and only the rendering changes per zone.
Seconds — 10 digits
Classic Unix time
- 1700000000
- Postgres, JWT exp/iat, most APIs
- Multiply by 1000 to get a JS Date
Milliseconds — 13 digits
JS / Java / logs
- 1700000000000
- Date.now(), currentTimeMillis()
- Values over ~1e11 → milliseconds
Always store and log in UTC
Converting in JavaScript, Python, Java & SQL
Every language has a one-liner. Remember that JavaScript's Date takes milliseconds, so multiply epoch seconds by 1000.
JavaScript
Date takes ms
new Date(1700000000 * 1000)
Python
UTC-aware
datetime.fromtimestamp(1700000000, tz=timezone.utc)
Java
java.time.Instant
Instant.ofEpochSecond(1700000000L)
SQL (Postgres)
to_timestamp
to_timestamp(1700000000)
The Year-2038 problem
Frequently asked questions
A Unix timestamp — also called epoch time or POSIX time — is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, the "Unix epoch", not counting leap seconds. It is a single absolute number that is the same everywhere in the world: it carries no timezone. To show it to a human you convert it into a calendar date in a chosen timezone (usually UTC or the viewer's local zone). For example, 1700000000 is 2023-11-14T22:13:20Z. Because it is just an integer, it is compact and easy to compare, sort and store, which is why logs, databases, APIs and JWTs use it.
This is the most common epoch bug. Classic Unix time counts seconds — a 10-digit number today (e.g. 1700000000). Many platforms — JavaScript Date.now(), Java System.currentTimeMillis() and many logs — use milliseconds, a 13-digit number (1700000000000). A value larger than about 1e11 is milliseconds; smaller is seconds. This tool auto-detects by magnitude and lets you override.
The timestamp itself never changes — it is a single UTC-absolute number. What changes is the timezone you render it in. 1700000000 is 22:13:20 in London (UTC) but 17:13:20 in New York and 03:43:20 the next morning in Kolkata. Always note which zone a displayed time is in, and prefer UTC (the "Z" suffix in ISO 8601) when storing or logging so there is no ambiguity. This tool always shows the UTC/ISO value and lets you additionally render the moment in a timezone of your choice, including your device's local zone.
Many older systems store Unix time in a signed 32-bit integer, which can only count up to 2,147,483,647 seconds. That limit is reached at 03:14:07 UTC on 19 January 2038, after which the counter overflows to a large negative number and the date wraps back to 1901 — the "Y2038" or "epochalypse" bug. Modern languages, including JavaScript (which uses 64-bit floating-point numbers) and 64-bit time_t on current operating systems, are not affected, so this tool converts 2038-and-beyond values correctly. The risk is in legacy C code, embedded devices and any system still storing time in a 32-bit field.
In JavaScript, multiply seconds by 1000 (Date takes milliseconds): new Date(1700000000 * 1000). In Python, use datetime.fromtimestamp(1700000000, tz=timezone.utc) for a UTC-aware datetime. In Java, use Instant.ofEpochSecond(1700000000L). In SQL (Postgres), use to_timestamp(1700000000). To go the other way, take the milliseconds since epoch and divide by 1000: in JavaScript Math.floor(Date.parse("2024-01-01T00:00:00Z") / 1000). This tool generates copy-ready snippets for the value you enter.
No. All conversion happens in your browser using the built-in JavaScript Date and Intl APIs — nothing is uploaded, logged or stored, and the tool works offline once loaded. The timezone rendering uses the IANA timezone database that ships with your browser/operating system, so daylight-saving transitions are handled for you.
Method, standards & references
Method: Unix time is seconds since 1970-01-01T00:00:00Z (UTC), ignoring leap seconds. The tool converts with the browser's native Date (milliseconds internally) and renders per-timezone with Intl.DateTimeFormat over the IANA timezone database. Seconds-vs-milliseconds is auto-detected by magnitude (> ~1e11 → ms) with a manual override. Nothing is sent to a server.
How we calculate this
Reviewed by Reckonist Editorial · Last reviewed 4 July 2026. Figures follow the methods and sources set out in our editorial standards.
This tool converts Unix timestamps and dates locally in your browser for development and debugging. Timezone rendering relies on the IANA database shipped with your browser; verify critical conversions against your production runtime.
Keep going
Same-category tools follow this colour; a cross-category link keeps its own.