Unix Timestamp Converter

Convert Unix timestamps to readable dates and back, in any time zone. Detects seconds, milliseconds, microseconds and nanoseconds automatically.

About Unix Timestamp Converter

This Unix timestamp converter turns epoch time into a readable date and a date back into a timestamp. Paste a number from a log file, database row or API response and see it in UTC, in any time zone and as ISO 8601, RFC 3339, RFC 2822 and HTTP-date strings, along with how long ago or how far ahead it is.

Seconds, milliseconds, microseconds and nanoseconds are recognised from the number of digits, so you rarely need to say which one you have. The conversion runs entirely in your browser, and nothing you paste is uploaded or saved.

How to use

  1. Paste a Unix timestamp; the unit is detected automatically, or pick seconds, milliseconds, microseconds or nanoseconds yourself.
  2. Read the date in UTC and in the time zone of your choice, plus the standard formats and relative time.
  3. To go the other way, enter a date, time and time zone, or paste a date string, and copy the timestamp in seconds or milliseconds.
  4. Convert many values at once in Batch convert, or copy a ready-made snippet for your programming language.

Features

Automatic unit detection
Up to 11 digits is read as seconds, up to 14 as milliseconds, up to 17 as microseconds and longer values as nanoseconds; you can override the guess.
All the common formats
See UTC, a chosen time zone, ISO 8601, RFC 3339, RFC 2822, HTTP-date and a relative description such as "3 days ago", each with a copy button.
Date to timestamp
Build a timestamp from a date, time and time zone, or paste an ISO 8601, RFC 3339, RFC 2822 or HTTP-date string.
Period boundaries
Get the timestamps for the start and end of the day, month and year that contain your timestamp, which is handy for database queries.
Batch conversion
Paste one timestamp or date per line, with units detected per line, and copy the results as CSV.
Code snippets
Ready-to-paste examples for JavaScript, Python, PostgreSQL, MySQL, Bash, Go, Java, C# and PHP use your timestamp.
Live current time
The current epoch time ticks in seconds and milliseconds at the top of the page, ready to copy.

Frequently asked questions

What is a Unix timestamp?

It's the number of seconds since 1 January 1970 at 00:00:00 UTC, the "Unix epoch". It ignores leap seconds, so every day counts as exactly 86,400 seconds, and the same moment has the same timestamp everywhere in the world.

How can I tell seconds from milliseconds?

Count the digits: a present-day timestamp in seconds has 10 digits (like 1730764800) and in milliseconds 13 (like 1730764800000). The converter does this for you and shows which unit it used.

What is the year 2038 problem?

Systems that store Unix time as a signed 32-bit integer can't count past 2,147,483,647 seconds, which is 19 January 2038 at 03:14:07 UTC. The converter flags timestamps after that point so you can spot values that may overflow older software.

Which time zone is the result in?

A timestamp itself has no time zone; it is a single moment. The converter always shows it in UTC and also in the zone you select, which starts as your device's zone.

Is it safe to paste timestamps from production logs?

Yes. Everything is converted on your device and nothing is sent anywhere. A share link only includes the timestamp you choose to share, and only if you copy it.