Unix Timestamp Converter
Seconds, milliseconds, microseconds or nanoseconds to dates and back, in any time zone.
About the Unix Timestamp Converter
Convert a Unix timestamp to a readable date, or a date to a timestamp. The tool recognises seconds, milliseconds, microseconds and nanoseconds by their length, handles decimals and dates before 1970, and shows the result as ISO 8601 (UTC and your time), the HTTP date format, your local time, the ISO week and the day of the year, plus the same moment in eleven cities around the world.
How to use it
- Paste a timestamp such as 1735689600, or a date such as 2026-01-31 14:30, or press Now.
- Or pick a date and time with the date picker.
- Read how the value was understood (for example “Read as milliseconds”) and any warning.
- Click any format to copy it.
Tip: Count the digits: 10 digits is seconds (used by Unix, PHP and Python), 13 is milliseconds (JavaScript and Java), 16 is microseconds and 19 is nanoseconds (Go and some databases). The tool works this out for you.
What is a Unix timestamp?
A Unix timestamp, also called epoch time or POSIX time, is the number of seconds since 00:00:00 UTC on 1 January 1970. It is the same everywhere in the world at the same moment, which makes it ideal for storing and comparing times: 1735689600 is midnight UTC on 1 January 2025, whether you are in London or Karachi.
Timestamps ignore leap seconds and have no time zone. The time zone only matters when you turn the number into a date for people to read.
Seconds, milliseconds, microseconds, nanoseconds
- Seconds (10 digits)
- Unix shells, PHP time(), Python time.time() (with decimals), MySQL UNIX_TIMESTAMP(), JWT exp and iat claims.
- Milliseconds (13 digits)
- JavaScript Date.now(), Java System.currentTimeMillis(), many JSON APIs.
- Microseconds (16 digits)
- PostgreSQL internals, Python datetime.timestamp() × 1,000,000.
- Nanoseconds (19 digits)
- Go time.UnixNano(), InfluxDB, some logging systems.
How dates are read
The tool always says which of these it used, so a five-hour mistake can't slip through.
- 2026-01-31
- A date on its own is read as midnight UTC, as the ISO standard and JavaScript do.
- 2026-01-31 14:30
- A date and time without a zone is read as your local time.
- 2026-01-31T14:30:00Z or +05:00
- With Z (UTC) or an offset, that zone is used.
- now
- The current moment.
Get the current timestamp in code
- JavaScript
- Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds.
- Python
- int(time.time())
- PHP
- time()
- Bash / Linux
- date +%s, and date -d @1735689600 to read one.
- SQL
- MySQL: UNIX_TIMESTAMP(); PostgreSQL: EXTRACT(EPOCH FROM now()).
The year 2038 problem
Systems that store seconds in a signed 32-bit number can count only up to 2147483647, which is 03:14:07 UTC on 19 January 2038. One second later the number overflows to a date in 1901. Modern systems use 64 bits, but old databases, file formats and embedded devices may not. The tool warns you when a timestamp is past that limit.
Date formats you can copy
- ISO 8601 (UTC)
- 2026-01-31T14:30:00.000Z: the safest format for APIs, JSON and logs, since it sorts correctly and includes the zone.
- ISO 8601 with offset
- 2026-01-31T19:30:00+05:00: the same moment written in your local time.
- HTTP date (RFC 7231)
- Sat, 31 Jan 2026 14:30:00 GMT: used in Expires, Last-Modified and cookie headers.
- ISO week and day of year
- 2026-W05 and day 31: handy for reports, planning and file names.
- Relative time
- “3 hours ago” or “in 2 days”, counted from now.
Converting timestamps in spreadsheets and databases
- Excel and Google Sheets
- Timestamp to date: =A1/86400+DATE(1970,1,1). Date to timestamp: =(A1-DATE(1970,1,1))*86400. Divide milliseconds by 1000 first. The result is in UTC.
- MySQL
- FROM_UNIXTIME(1735689600) gives a date; UNIX_TIMESTAMP('2025-01-01 00:00:00') gives the number.
- PostgreSQL
- to_timestamp(1735689600) gives a timestamptz; EXTRACT(EPOCH FROM ts) goes back.
- SQLite
- datetime(1735689600, 'unixepoch') and strftime('%s', 'now').
- JavaScript
- new Date(1735689600 * 1000).toISOString(), and Math.floor(new Date('2025-01-01T00:00:00Z').getTime() / 1000).
Time zones and daylight saving
The world-clock list shows the same moment in eleven cities, from Los Angeles to Tokyo, with daylight saving applied for that date. Offsets change during the year: London is UTC+0 in winter and UTC+1 in summer, New York UTC−5 or UTC−4. That is why storing a timestamp or a UTC date is safer than storing a local time without its zone.
Tips and tricks
Save timestamps or UTC dates in your database and convert to the reader's zone only when displaying them.
Paste a token's exp value to see exactly when it expires, and how long from now.
1,735,689,600 and 1_735_689_600 are read correctly.
Week 1 is the week with the year's first Thursday, so 1 January 2027 falls in week 53 of 2026.
Questions
How do I convert a Unix timestamp to a date?
Paste it into the box. The date appears in UTC and in your time zone, plus around the world. In Excel, use =A1/86400+DATE(1970,1,1) and format the cell as a date.
Why is my date 1970 or year 50000?
The unit is wrong: a seconds value read as milliseconds lands in January 1970, and milliseconds read as seconds lands tens of thousands of years ahead. The tool picks the unit by length to avoid this.
What is the timestamp for a date before 1970?
A negative number: -86400 is 31 December 1969.
Does a Unix timestamp depend on the time zone?
No. The same moment has the same timestamp everywhere; only its local date and time differ.
What is the current Unix timestamp?
Press Now: the tool fills in the current time and shows the timestamp in seconds and milliseconds, ready to copy.
How do I convert a date to a Unix timestamp?
Type the date, for example 2026-03-01 09:00, or pick it with the date picker. The timestamp appears in seconds and milliseconds. Add Z for UTC or an offset like +05:00 if the time isn't in your zone.
Why does my converted date look one day off?
A time near midnight UTC can be the previous or next day in your local time. Compare the UTC and local rows to see which you need.
Is anything I type uploaded?
No. The tool runs in your browser; what you type, paste or open never leaves your device and nothing is stored on a server.
Related tools
Updated