Computers store time as a single number: the seconds that have passed since midnight on 1 January 1970, a moment programmers call the epoch. That number is called a Unix timestamp or epoch time, and you meet it everywhere — in log files, database records, API responses and file metadata. This free converter works in both directions: turn a date and time into epoch time, or turn a timestamp back into a readable date, with no sign-up and nothing to install.
If you have ever stared at a ten-digit number like 1704067200 in a log file and wondered when it happened, this is the tool that answers it.
How to use the date to epoch time converter
- To convert a date: pick a date and time in the first field and click “Convert to Epoch Time”.
- To convert a timestamp: enter the number in the second field — 10 digits for seconds or 13 digits for milliseconds — and click “Convert to Date”.
- Read the result shown on the page, and copy it where you need it.
A worked example
Midnight at the start of 1 January 2024, in UTC, is the timestamp 1704067200. That is 1,704,067,200 seconds after 1 January 1970. The same instant written in milliseconds — the format JavaScript and many APIs use — is 1704067200000, the same number with three extra zeros. Going the other way, paste 1697049600 into the tool and it gives you a date in October 2023. If your result is off by a few hours, the usual cause is time zones: a date entered in local time converts to the timestamp for that local time, which differs from UTC by your offset, so check whether the system you are working with expects UTC or local time before you compare numbers.
Where epoch time shows up
- Log files and debugging: servers stamp events with epoch time, so converting a stamp to a date is the first step in tracking down when something went wrong.
- APIs and databases: many services return dates as timestamps, and developers convert them to check expiry times, scheduled posts and token lifetimes.
- Scheduled jobs and expiry dates: comparing two timestamps tells you instantly which event is earlier and how far apart they are, with no calendar maths.
- File and photo metadata: creation and modification times are often stored as epoch values behind the scenes.
Seconds, milliseconds and microseconds
The classic Unix timestamp counts seconds and has 10 digits today. JavaScript’s Date.now() and many modern APIs count milliseconds and have 13 digits. Some high-precision systems count microseconds, with 16 digits. The easiest way to tell them apart is the length: if your number has 13 digits and converts to a date thousands of years in the future when read as seconds, it is milliseconds — divide by 1,000 first. This tool accepts both seconds and milliseconds, so paste the number as it is and it sorts out which one you mean.
Honest limitations
- Time-zone handling is the biggest trap. A timestamp itself has no time zone — it is one instant worldwide — but the readable date you get from it depends on the zone it is shown in, so the same stamp can read as two different clock times in two places.
- Dates before 1970 give negative timestamps, and very old or far-future dates may not convert on every system, because of the 2038 limit on older 32-bit software.
- Leap seconds are not counted in Unix time, so conversions can be off by a few seconds around leap-second events — irrelevant for most uses, but worth knowing for precise scientific work.
- Daylight saving changes do not affect the timestamp, but they do affect the local clock time a timestamp displays as, which is another reason to confirm whether UTC or local time is expected.
Date to epoch time converter – frequently asked questions
What is epoch time?
The number of seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is also called Unix time or a Unix timestamp.
Why does my timestamp have 13 digits?
It is counting milliseconds instead of seconds. Divide by 1,000 to get the classic 10-digit seconds timestamp, or paste it into this tool as it is.
Why is my converted date off by a few hours?
Almost always a time-zone difference: the timestamp is one instant, but its clock reading changes with the zone. Convert in UTC, then shift by your local offset if the system expects local time.
What happens in 2038?
On 19 January 2038, a signed 32-bit seconds counter runs out of room. Modern 64-bit systems are unaffected, but very old software may fail on dates after that point. For the reverse direction, see the epoch time to date converter.
Related tools
- Online Epoch Time to Date Converter
- German Date Format Converter
- Date to Milliseconds Converter
- Countdown to a Specific Date Tool
- Sunrise and Sunset Time Estimator
- Online AI Content Detector with Percentage
- Online Collage Maker Tool
- Stopwatch with Split Timer Feature
More tools in this collection · All free online tools
Embed this tool on your website — free
Copy the code below to add this working tool to your own page. A small credit link stays with it — that’s all we ask.
