Skip to content

Epoch converter: Unix timestamp to date and back

Paste a Unix timestamp from a log file, a database or an API and see the date and time in UTC, in your own zone and in all six Gulf capitals at once. The converter tells seconds, milliseconds, microseconds and nanoseconds apart by their length, turns a date and time back into an epoch number, and converts a whole list to CSV. Everything is calculated in your browser.

Quick answer

Paste the number: 10 digits are read as seconds and 13 as milliseconds. The date appears at once in UTC, in Dubai (UTC+4), in Riyadh (UTC+3) and in any zone you pick. To go the other way, choose a date, a time and a zone, then copy the seconds or milliseconds.

Based on The Open Group: POSIX Base Definitions, 4.19 Seconds Since the Epoch · Page updated 23 October 2026

Editor: Abuzar, founder of NeedMyToolsHow we check facts

Current Unix time

Seconds

…

Milliseconds

…

Timestamp to date

Result

Type or paste a timestamp to see the date.

Date to timestamp

ISO 8601 or RFC 3339, such as 2026-11-04T10:30:00Z or 2026-11-04 14:30+04:00, or an HTTP date. Without an offset the zone above is used.

Convert a list

Everything is calculated in your browser with its built-in time zone data. Nothing you type is sent anywhere.

How to use the Unix Timestamp Converter

  1. Paste a timestamp into the box. The unit is detected from the number of digits; change it if your system uses another one.
  2. Read the date in UTC, in the zone you choose and in the six Gulf capitals. Copy any value or download them all as a text file.
  3. To get a timestamp, pick a date, a time and its time zone, or paste a written date. For many values, paste one per line under Convert a list and download the CSV.

What a Unix timestamp is

A Unix timestamp counts the seconds since 00:00:00 UTC on 1 January 1970, a moment known as the Unix epoch. The POSIX standard defines every day in this count as exactly 86,400 seconds, so leap seconds are not included and the arithmetic stays simple. The same number means the same instant everywhere on Earth: only the way it is written changes with the time zone. JavaScript and many web APIs count milliseconds instead, which gives 13 digits rather than 10, and some databases and tracing tools use microseconds (16 digits) or nanoseconds (19 digits). Negative values are moments before 1970, so -86400 is midnight UTC on 31 December 1969.

Seconds or milliseconds: how the unit is chosen

With Detect selected, a value of up to 11 digits is read as seconds (enough for dates until the year 5138), 12 to 14 digits as milliseconds, 15 to 17 as microseconds and 18 or more as nanoseconds. The unit used is shown under the box, and you can force another one. Spaces, commas and underscores used to group thousands are ignored, and a decimal such as 1700000000.5 keeps its fraction. The tool calculates with whole numbers rather than floating point, so a 19-digit nanosecond value from a trace keeps every digit when it is shown again in microseconds or nanoseconds.

Gulf time zones and daylight saving

Time zone rules come from the IANA time zone database built into your browser. In that database (release 2026e) Dubai and Muscat are four hours ahead of UTC, while Riyadh, Kuwait, Doha and Manama are three hours ahead, and none of the six uses daylight saving time, so the offset is the same in summer and winter. A server log line stamped 10:30 UTC is therefore 14:30 in Dubai and 13:30 in Riyadh. For places that change their clocks, such as London or New York, the converter applies the offset in force on that particular date, which matters when you read old logs. To compare office hours between cities without a timestamp, use the time zone converter.

Dates to timestamps, ISO 8601 and HTTP dates

Under Date to timestamp, choose a date, a time down to the second and the zone that date belongs to, and copy the result in seconds or milliseconds for a database query, a cookie expiry or a test fixture. You can also paste a written date: ISO 8601 and RFC 3339 forms such as 2026-11-04T10:30:00Z or 2026-11-04 14:30+04:00, or an HTTP date such as Wed, 04 Nov 2026 10:30:00 GMT. A date written without an offset is read in the zone you selected. The result panel also gives the RFC 3339 form in your chosen zone, the HTTP date used in headers, the ISO week number and the day of the year, which are handy for log rotation and weekly reports.

The year 2038 and common mistakes

Systems that store seconds in a signed 32-bit integer can count only up to 2,147,483,647, which is 03:14:07 UTC on 19 January 2038; one second later the value no longer fits. Paste 2147483647 to see the limit. If a converted date lands on 1 January 1970, the source value was probably zero or empty. If it lands thousands of years in the future, a millisecond value was read as seconds, so switch the unit. The Hijri date shown is the Umm al-Qura calendar date for that day in the selected zone, taken from your browser’s calendar data for 1882 to 2077; for religious occasions the official moon-sighting announcement in your country takes precedence, and the Hijri date converter explains the calendar.

Frequently asked questions

How do I convert a Unix timestamp to Dubai time?

Paste the timestamp into this Unix timestamp converter and read the Dubai row: Dubai is UTC+4 all year, with no daylight saving, so the time is always four hours after UTC. Riyadh, Kuwait, Doha and Manama are UTC+3.

Why does my timestamp turn into a date in 1970?

The value was zero, empty, or very small. A timestamp counts from 1 January 1970, so 0 is exactly that moment. Check that the field really holds a timestamp and was not cut short.

Is a Unix timestamp different in each time zone?

No. The number is the same everywhere, because it counts seconds from one fixed moment in UTC. Only the local date and time you display from it depend on the time zone.

How do I get the current epoch time in milliseconds?

The live clock at the top shows the current time in seconds and in milliseconds, with a copy button for each. In JavaScript the same value is Date.now().

Can the epoch converter handle a whole column of timestamps at once?

Yes. Paste them one per line under Convert a list and download the CSV, which has the original value, the unit, the UTC time and the time in your chosen zone for every line. Lines that are not numbers are marked.