This page provides a Unix Epoch timestamp converter. You can convert Unix Epoch timestamps to formatted date strings and vice versa. This converter uses the Moment.js JavaScript library (version 2.24.0) available at https://momentjs.com/. The first box below shows the current Unix Epoch timestamp and the current local date. These two values are refreshed every 5 seconds.

Current Unix Epoch Timestamp
156789990000
Current Local Date

Convert from a Local Date to a Unix Epoch Timestamp

Enter a local date using the input controls and then click on the Convert button to convert it to a Unix Epoch timestamp in milliseconds.

Local Date
 :  :   (HH:MM:ss)
Unix Epoch Timestamp

Convert from a Unix Epoch Timestamp to a Local Date

Enter a Unix Epoch timestamp in milliseconds and select a date format from the auto-complete control or enter your own (see list of supported tokens in next section). Then click on the Convert button to get the formatted local date.

Unix Epoch Timestamp
Date Format
Local Date

Partial List of Supported Tokens for Date Formats

For a full list of supported date formats tokens, refer to the Moment.js documentation and ISO 8601. You can enter your own pattern in the Date Format auto-complete control.

YY
Double digit year, e.g.: 70 71 … 29 30
YYYY
Four digit year, e.g.: 1970 1971 … 2029 2030
M
Single digit month, e.g.: 1 2 … 11 12
MM
Double digit month, e.g.: 01 02 … 11 12
MMM
Abbreviated month name, e.g.: Jan Feb … Nov Dec
MMMM
Full month name, e.g.: January February … November December
D
Single digit day of month, e.g.: 1 2 … 30 31
Do
Day of month, e.g.: 1st 2nd … 30th 31st
DD
Double digit day of month, e.g.: 01 02 … 30 31
H
Single digit hour of day in 24h format, e.g.: 0 1 … 22 23
HH
Double digit hour of day in 24h format, e.g.: 00 01 … 22 23
h
Single digit hour of day in 12h format, e.g.: 1 2 … 11 12
hh
Double digit hour of day in 12h format, e.g.: 01 02 … 11 12
a
AM/PM in lower case, e.g.: am pm
A
AM/PM in upper case, e.g.: AM PM
Z
Time zone offset from UTC, e.g.: -04:00 -05:00 … +04:00 +05:00
ZZ
Time zone offset from UTC, e.g.: -0400 -0500 … +0400 +0500