Free developer tool

Unix Timestamp Converter

Convert a Unix timestamp to a readable date, or turn any date into epoch time. This converter detects seconds, milliseconds, microseconds and nanoseconds on its own, then shows the result in your local time zone, in UTC and in ISO 8601 format.

Runs fully in your browser No data sent to a server Auto unit detection No sign up
Current Unix timestamp 0000000000
0

Detected unit: seconds

Ten digits is usually seconds, thirteen digits is usually milliseconds.

Converted date

Your local time-
Time zone-
UTC (GMT)-
ISO 8601-
RFC 2822-
Relative-
Seconds / milliseconds-
Day, week, day of year-

Why this converter

Built for the epoch problems that actually slow you down

Most timestamp tools give you one line of output and leave you guessing about units and time zones. This one answers the follow up questions in the same view.

Automatic unit detection

Paste ten digits, thirteen digits, sixteen or nineteen and the converter works out whether you handed it seconds, milliseconds, microseconds or nanoseconds. You can always override the guess.

Local time and UTC together

Timestamp bugs usually turn out to be time zone bugs. Both readings appear side by side, along with the IANA zone name your browser reports, so mismatches are obvious right away.

Every format you need to paste

ISO 8601, RFC 2822, plain local formatting, relative time, plus the seconds and milliseconds values. Each row has its own copy button, so nothing has to be retyped.

Conversion in both directions

Go from epoch to a readable date, or pick a date and time and read the epoch value back. The same panel handles both jobs without reloading the page.

Nothing leaves your browser

All arithmetic runs in JavaScript on your device. No timestamp is uploaded, logged or stored, which matters when the value came out of a production log.

Fast and keyboard friendly

No frameworks, no external fonts and no tracking scripts. Every control has a real label, tab order is sensible and focus states are visible.

How to use it

Convert epoch time in three steps

Pick a direction

Use the first tab to convert a Unix timestamp to a date. Use the second tab when you already have a date and need the epoch value.

Paste or choose your value

Drop the raw number straight from your log or database. The unit is detected as you type, and the shortcut buttons cover common reference points.

Copy the format you need

Results update instantly. Hit the copy button on any row to put that exact string on your clipboard, ready for a ticket, a query or a test fixture.

What you get

Benefits of a converter that shows its working

  • Fewer off by 1000 mistakes. Seeing the detected unit before you trust the date stops the classic error of reading milliseconds as seconds.
  • Faster debugging. Local time, UTC and relative time appear together, so you can tell at a glance whether an event fired earlier or later than you expected.
  • Cleaner tickets and tests. Copy an exact ISO 8601 string instead of hand typing a date that a reviewer then has to double check.
  • Safe for production data. Because the conversion is local, you can paste a customer facing timestamp without sending it anywhere.
  • Useful reference built in. Common intervals, the year 2038 boundary and code snippets for six languages sit on the same page.
  • Works on a phone. The layout, the tap targets and the copy buttons are all designed for a small screen, not squeezed down from a desktop table.
Reference

Epoch time cheat sheet

Handy constants and reference points that come up when you work with Unix time.

Common Unix time intervals and reference timestamps
Interval or momentValue in secondsNotes
One minute60Base unit for most rate limits
One hour3600Also the size of most time zone offsets
One day86400Ignores daylight saving shifts
One week604800Common cache and token lifetime
Thirty days2592000Often used as a billing month
One year (365 days)31536000A leap year adds another 86400
Epoch zero01 January 1970 at 00:00:00 UTC
Year 2000 rollover9466848001 January 2000 at 00:00:00 UTC
Signed 32 bit limit214748364719 January 2038, the year 2038 problem

Get the current Unix timestamp in code

// Seconds
Math.floor(Date.now() / 1000);

// Milliseconds
Date.now();

// Timestamp back to a Date
new Date(1767225600 * 1000).toISOString();
FAQ

Unix timestamp questions, answered

What is a Unix timestamp?

A Unix timestamp is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, a moment known as the Unix epoch. It is a single integer with no time zone attached, which makes it easy to store, sort and compare. Almost every operating system, database and API uses some form of it, which is why it shows up constantly in logs, JSON payloads and database columns.

How do I convert a Unix timestamp to a readable date?

Paste the number into the timestamp field above. The converter detects the unit, then shows the date in your local time zone, in UTC, and in ISO 8601 and RFC 2822 format. Each row has a copy button so you can take the exact string you need.

In code, multiply seconds by 1000 before handing the value to a JavaScript Date, use datetime.fromtimestamp in Python, or FROM_UNIXTIME in MySQL.

Is my timestamp in seconds or milliseconds?

Digit count is the quickest tell. For dates in the current era, a ten digit number is seconds, thirteen digits is milliseconds, sixteen digits is microseconds and nineteen digits is nanoseconds. If you convert milliseconds as though they were seconds you land tens of thousands of years in the future, which is usually the first sign something is wrong. The converter above shows its detected unit so you can check before you trust the result.

What time zone is a Unix timestamp in?

None. A Unix timestamp counts seconds from a fixed moment in UTC, so the number itself carries no zone or daylight saving information. A time zone only enters the picture when you format that number for a human. That is why this tool displays local time and UTC together, and names the zone your browser is using, so you can see exactly which interpretation you are looking at.

What is the year 2038 problem?

Systems that store Unix time in a signed 32 bit integer can only count up to 2147483647 seconds, which is reached on 19 January 2038 at 03:14:07 UTC. One second later the value overflows and wraps to a negative number, putting the date back in December 1901. Modern platforms use 64 bit integers and are unaffected, but older embedded devices, legacy file formats and some database columns still need attention.

Can a Unix timestamp be negative?

Yes. Negative values represent moments before 1 January 1970. For example, -86400 is 31 December 1969. Plenty of libraries handle negative epoch values correctly, but some older systems and unsigned integer columns do not, so historical dates are worth testing rather than assuming.

Does this converter send my data anywhere?

No. Every conversion runs in JavaScript inside your own browser. Nothing you type is transmitted, logged or stored, so it is safe to paste values taken from production logs or customer records.

Why does the epoch start in 1970?

The date was a practical choice made by the early Unix developers in the early 1970s. They needed a recent, round starting point that would not waste the limited range of the integers available on the hardware of the day. 1 January 1970 was close enough to the present to be useful and far enough back to cover the dates people actually recorded, and it simply stuck.

Bookmark it for the next timestamp in your logs

Epoch values turn up in every API response, cron log and database row. Keep this converter one tab away, and pair it with the other free tools on Deepak Surya.

Scroll to Top