Date to Epoch Converter. Date to Unix Timestamp
Type a date (any common format) and get the exact Unix timestamp (epoch) in seconds, milliseconds, or microseconds, in the timezone you need.
One timestamp, every format.
Convert epoch time to dates and back. Precision auto-detected, timezone your choice.
Dates below render in the timezone above. Press / to focus the field.
Deep-link any timestamp with ?ts=1722750000
How to convert a date to a Unix timestamp
Switch the converter above to Date → Timestamp, type any date string, and the epoch value appears in seconds, milliseconds, and microseconds at once. You can also use the built-in date-time picker to choose a moment without typing.
Accepted inputs include 2026-08-05 12:00:00, Aug 5, 2026 12:00 PM,
2026-08-05T12:00:00Z, and the numeric 08/05/2026 12:00. The
date-to-epoch conversion is the exact inverse of the
Unix timestamp to date converter.
Timezone is everything
A date string without a timezone is ambiguous: 2026-08-05 12:00 in UTC is a
different timestamp than the same wall-clock time in Asia/Kolkata (five and a
half hours earlier). This converter reads dates in your local timezone by
default, matching how most people type them, and you can switch to UTC or any IANA zone
with the timezone picker.
- Server timestamps are almost always UTC, choose UTC to match your logs and database values.
- Human-readable dates ("the meeting at 2 PM my time") should use your Local timezone.
- Append
Zto a string (2026-08-05T12:00:00Z) to force UTC interpretation.
Example conversions
2024-01-01 00:00 UTC→1704067200(10-digit seconds).2026-08-05 12:00 UTC→1785931200.- The same date in milliseconds →
1785931200000, and in microseconds →1785931200000000.
If you are storing a value in a database or sending it through an API, copy the column that matches your system's unit, most databases store 10-digit seconds, while most JavaScript APIs expect 13-digit milliseconds.
Common date-to-epoch mistakes
- Assuming local when the system means UTC, off-by-hours bugs in logs and scheduled jobs are usually this.
- Rounding instead of flooring.
2026-08-05 12:00:59still belongs to second1785931259, not the next one. - Milliseconds vs seconds in APIs, sending
1785931200where1785931200000is expected shifts the date by about 56,000 years. - The year 2038 problem, on 32-bit systems, seconds-based timestamps overflow in 2038; milliseconds-based values bought systems more headroom.
Date to epoch in your own code
For one-off checks this page is fastest, but when you need the conversion in a script, these one-liners do the same job:
- JavaScript:
Math.floor(new Date("2026-08-05T12:00:00Z").getTime() / 1000) - Python:
int(datetime.fromisoformat("2026-08-05 12:00:00+00:00").timestamp()) - PHP:
strtotime("2026-08-05 12:00:00 UTC") - MySQL:
UNIX_TIMESTAMP('2026-08-05 12:00:00')(interpreted in the session timezone)
Batch date conversion
The batch converter handles lists of epoch values rather than dates, but you can convert whole spreadsheets of timestamps to readable dates and export them as TSV or CSV in one click. See also the milliseconds to epoch converter for high-precision values.
First published · Last reviewed · Maintained and developed by the Real Epoch Converter team · [email protected] · Contact · Methodology
More timestamp tools
- Epoch time converter — the free online epoch converter
- Unix timestamp to date converter
- Date to epoch converter
- Milliseconds to epoch converter
- Snowflake ID converter
- LDAP / Active Directory converter
- GPS time converter
- NTP timestamp converter
- .NET ticks converter
- Mac HFS+ timestamp converter
- Excel / OADate converter
- UUID v1 / v7 & ULID converter
- Chrome / WebKit converter
- Cocoa Core Data converter
- Timezone converter
- Day of the year converter
- ISO week number converter
- Unix hex converter
- Year 2038 countdown
- Common Unix timestamps
Need the reverse direction, another precision, or a whole list at once? The epoch time converter on the home page converts dates to Unix timestamps and back — seconds, milliseconds, or microseconds — with batch conversion, and the Unix timestamp to date converter handles one value at a time.
Prefer reading? The guides explain Unix time, timestamp formats, and common bugs in depth, and the methodology page documents exactly how this site handles negative timestamps, fractional seconds, leap seconds, and daylight-saving transitions.