Unix Timestamp Converter
Epochs to Dates, and Back Again
Insert a number into this Unix timestamp converter and view the date in any time zone. Alternatively, select a date and get the timestamp in seconds and milliseconds.
- FreePrice
- Every IANA zoneTime zones
- NoneSign-up
- In your browserRuns
Unix Timestamp Converter
Epoch time to date and back, in any time zone
Ready. Type a timestamp or pick a date.
| Format | Value | Copy |
|---|
| Result | Check | Details |
|---|
Convert a whole list of timestamps
| Input | UTC | Selected time zone |
|---|
Guides for this tool
Articles with worked examples, tables and a short video that help you get more from this tool.
How to Convert Time to a Unix Timestamp (Any Time Zone)Turn any date and time into Unix seconds or milliseconds, in your browser, a terminal, Excel or code, without the time-zone mistakes that shift results by hours.
11 minutes of reading · video guide inside
Jobs This Unix Timestamp Converter Handles for You
This conversion tool converts Unix time stamps (epoch) to human readable dates, as well as converting dates into Unix time stamps. The clock above displays the current Unix time, and updates every second. All amounts are displayed in words on your computer/phone, so it will continue to function off-line once the page is loaded.
Developers run into timestamps almost everywhere. Logs, databases, API replies, JWT tokens and analytics exports all store time as one long number. That number is compact and easy to sort, but nobody can read 1735689600 at a glance. So this epoch converter shows it as a date, in UTC and in the time zone you choose.
It answers the questions you may have about what day of the week it was, what ISO week, how much time has passed since then, and if that date will fit into a 32-bit field. For each line of output there is a copy button.
What the Unix Clock Really Measures
Unix time tallies seconds from midnight UTC on 1 January 1970, the instant called the Unix epoch. The count is the same everywhere on Earth at the same instant, because it has no time zone. What changes is only how the moment is shown.
Leap seconds are ignored too, so each day is exactly 86,400 seconds long. That makes the arithmetic simple: add 86,400 for a day, 604,800 for a week. Moments before 1970 are simply negative numbers.
Seconds, Milliseconds or Nanoseconds?
The same time frame can be represented by 10 digits for seconds, 13 for milliseconds, 16 for microseconds and 19 for nanoseconds. JavaScript and Java typically represent time frames using milliseconds; whereas PHP, Python and many databases represent time frames using seconds. Go and several logging programs represent time frames using nanoseconds.

The converter will automatically work out how many digits you enter, select an appropriate unit for you, and tell you which unit it selected in the "checks" area. In cases where the value is ambiguous, you must manually select the appropriate unit from the menu. When reading long values, the converter uses exact integer mathematics, meaning that even a 19 digit nanosecond timestamp retains all of its digits.
Timestamp to Date in Whatever Time Zone You Need
Every zone on the menu is what the results will be based on. Every zone that your browser can find in the IANA time zone database, that records when each country has daylight savings and the history of those changes, is in this list. Because of that, a date in 1995 will use the rules that were used in 1995, not today’s.

The results also include the offset from UTC (for example, UTC+05:00). Also, the ISO 8601 line will show this offset; so, the value can be passed to another system without being misinterpreted. The format used is based on RFC 3339, which is the most common profile of ISO 8601 used by APIs.
Date to Timestamp, Even Around Clock Changes
Going the other way is where a lot of converters mess up. In Spring, when clocks move ahead one hour of local time doesn’t happen. In Fall, when clocks move back, the same hour happens again. A bad tool will pick something and your job runs on a different schedule by one hour.

This converter checks both cases. A time that never happened is moved to the first real moment after the jump, and a time that happened twice uses the first of the two. Either way, the checks table says so in plain words.
The Year 2038 Problem
The use of signed 32-bit integers to store Unix Time in older systems will result in the maximum possible integer value (2,147,483,647) being reached on January 19, 2038, at 03:14:07 UTC. At this point, the time counter would roll over to 1901. To work out if your timestamps are still valid, check the columns of the database checks table for each column that uses Unix Time.
Many modern computer systems now use 64-bit time, which can last for several billion years. But many older file formats, small computing devices, and some database column definitions continue to use 32-bit limits. So, it may be worthwhile to review the check.
Epoch Converter Code for Common Languages
Getting the current timestamp is a one-liner almost everywhere. In JavaScript, Date.now() returns milliseconds, so divide by 1000 for seconds. In PHP use time(), in Python time.time(), and in a shell date +%s. MySQL has UNIX_TIMESTAMP(), and PostgreSQL has EXTRACT(EPOCH FROM now()).
Converting back is just as short, yet the time zone is where bugs hide. For example, JavaScript’s Date object always works in the visitor’s zone unless you ask for UTC. When a value looks one or more hours off, check it here in UTC first.
Turn a Full List of Timestamps Into Dates
Log files and exported data typically contain multiple entries. Enter your timestamps into the list section, with one timestamp on each line. The program will then create a table containing both the UTC date and local date for each timestamp. If there are lines in your list which are not timestamps, the program will indicate these as such rather than stopping the entire process.
Once you have finished editing your table, then export it as a CSV file to be used with either Excel or Google Sheets. If you received the data in JSON format, then we can use our JSON to CSV converter to convert the data into columns before exporting.
Where Timestamps Hide in Everyday Data
The JSON Web Token contains three of these values; "iat" is the time the token was created, "nbf" is the time the token can be used, and "exp" is the time the token will expire. These values are given in seconds. Paste your "exp" value into this field to quickly work out if your token has expired.
Web servers also write date info. The Expires and Last-Modified headers are written using the RFC 2822 format as displayed in the above table. On the other hand, many APIs give date info using either ISO 8601 or epoch seconds. Database formats vary too; a TIMESTAMP column in MySQL will expire at some point during the year 2038, but DATETIME and BIGINT columns in MySQL do not have this limitation.
Spreadsheets add one more twist. Excel and Google Sheets count days since 1899, so a date copied from a sheet may arrive as 45658. The serial row in the table gives you that number for any moment, which means you can paste it straight into a cell.
A Quick Walkthrough of the Unix Timestamp Converter
This brief video shows each step from start to finish. Choose your language below, and switch on captions if they help.
Converting a Unix Timestamp on Denwix
You can see the results right away after typing when converting from a time stamp to a calendar day.
Paste the number
You may enter the epoch number or copy and paste it here. Spaces and commas are allowed to separate the digits.
Check the unit
The ten digit format represents seconds. Thirteen represents milliseconds. The conversion software handles microseconds and nanoseconds in the same manner. Change the format here if you need to.
Choose the time zone
Your own zone is selected first. Pick UTC or any other zone from the list.
Grab whichever of the Denwix outputs suits your editor
Each line has a copy button, from ISO 8601 to the Excel serial number.
Built for Real Timestamps
An epoch converter can handle simple scenarios. But there are things an epoch converter does not do.
Exact to the nanosecond
Long values use integer maths, so no digit is rounded away.
Every IANA time zone
Historical daylight saving rules are applied for any date.
Clock changes caught
Times that never happened or happened twice are flagged.
Fifteen formats
ISO 8601, RFC 2822, SQL, ISO week, Excel serial and more.
Whole lists
Convert thousands of lines and download the result as CSV.
Works offline
Once the page loads, nothing else is fetched and nothing is sent.
Rules for Storing Time Safely
Most time bugs come from breaking one of these habits.
- Store instants in UTC. Store the epoch value or a UTC date, and switch to local time only on screen.
- Name the field created_ms or created_s so the unit is obvious. A column called created_at_ms leaves no doubt about milliseconds.
- Use 64-bit integers. They hold dates far beyond 2038, while 32-bit fields run out.
- Send dates like 2026-09-28T10:00:00+05:00. A value such as 2026-09-27T10:15:00Z means the same everywhere.
- Keep the zone for future events. For a future conference (next year) save the current time of your location as well as the IANA zone, as these are subject to change.
- Never do date maths in local time. Adding 24 hours across a clock change lands an hour off; add days in UTC instead.
- Update your time zone database regularly. Countries change their rules, so update the tz data your servers use.
- Test the edges. Check dates around clock changes, New Year and 29 February before release.
Six Timestamp Mistakes to Avoid
Each one produces a date that looks plausible and is wrong.
Confusing seconds with milliseconds
In other words, when reading milliseconds as if they were seconds, the date will leap tens of thousands of years ahead in time.
Showing server time as user time
A date formatted in the server zone confuses every visitor elsewhere.
Ignoring daylight saving
A fixed offset such as +01:00 is wrong for half the year in many zones.
Rounding long IDs
Nanosecond values pushed through floating point lose their last digits.
Trusting 32-bit fields
They overflow in January 2038 and jump back to 1901.
Reading dates that have no time zone
Text such as 2026-09-27 10:00 means a different instant in every city.
Questions About Unix Timestamps
What does the number in a Unix timestamp measure?
It is the amount of time in seconds that have gone by from midnight UTC on January 1, 1970. No matter what time zone you are in, this same number represents the exact same point in time.
What steps turn an epoch number into a date on Denwix?
Drop it into the Denwix converter. You can see the converted date in UTC and in your time zone right away, along with ISO 8601 and extra formats.
My epoch value has 13 digits. Does that mean milliseconds?
The number of digits should be counted. Now, a second value contains 10 digits and a millisecond value contains 13. This checking is done by the converter.
How can I find the epoch number for a given date?
You can select the date and time from the date field, or type in a date in any format and then click "Get Timestamp". Your selected time zone will be applied by the converter.
Why is my date off by some hours?
The timezone is often different. Compare the UTC line with your local line, then find out what timezone the other system was in.
Are leap seconds part of Unix time?
No. Every single day is exactly 86,400 seconds; so, a leap second either repeats the very last second of each day or extends the duration of that same second.
Why could some systems fail in January 2038?
Signed 32-bit counter limits occur when the time is 03:14:07 UTC on 19 January 2038. Those systems that have implemented 64-bit systems will not be affected.
Can a Unix timestamp go below zero?
Yes. Negative values count back from 1970, so -86400 is 31 December 1969 at midnight UTC.
What’s an Excel serial number?
Spreadsheets store dates as days since 30 December 1899. Paste the serial into a cell and format it as a date.
How do I check when a login token expires?
Copy the exp number from the decoded token and place it in this box. If that date was yesterday (or before), then your token has expired.
Which time zone does the converter use first?
By default, it uses the timezone of your computer (the timezone reported by your web browser). You may change the default timezone to UTC or any other IANA zone at any point in time; all results will then reflect that change.
Does it also work for dates earlier than 1970?
Yes, you can choose any day, even hundreds of years in the past, and it will be given a negative time stamp.
Does this Denwix tool send anything to a server?
No, the conversion is based upon the clock and time zone info given by your web browser; no other data will be transmitted from this page.
More Tools for Developers
Handy when timestamps sit inside bigger data.
- JSON Formatter
Read and tidy the JSON a timestamp came from.
- JSON to CSV Converter
Turn JSON logs into a table for a spreadsheet.
- Base64 Encoder and Decoder
Decode token parts that carry timestamps inside.
Ready to Convert Your Timestamp?
The user can see the Unix timestamp and its corresponding date right away after they input it. The free Unix Timestamp Converter does not need an account, and operates within the user’s web browser.