Timestamp to Date Converter

Timestamp ↔ Date / Multi-timezone / Batch

Click a star to rate
Current timestamp (seconds):1793809842
Milliseconds:1793809842361
2026-11-05 00:30:42

Timestamp → Date

Date2026-11-05 00:30:42
WeekdayThursday
TimezoneAsia/Shanghai (UTC+8:00)
UTCWed, 04 Nov 2026 16:30:42 UTC
ISO 86012026-11-04T16:30:42.361Z
RFC 2822Wed, 04 Nov 2026 16:30:42 UTC

Batch Timestamp → Date

Input (one timestamp per line)
Result

10-digit vs 13-digit Timestamp Comparison

TypeDigitsMeaningExample
Second-level timestamp10Total seconds since 1970-01-01 00:00:00 UTC1705293000
Millisecond-level timestamp13Total milliseconds since 1970-01-01 00:00:00 UTC1705293000000

The two units differ by a factor of 1000 — mixing them shifts the converted date by decades. This tool auto-detects seconds/milliseconds, so you do not need to guess; the top of the page also shows the current timestamp in both units, tap to copy.

What Is a Unix Timestamp?

A Unix timestamp counts the total seconds since 1970-01-01 00:00:00 UTC, also called Epoch time. Second-level timestamps are 10 digits, millisecond-level ones are 13 digits — different units separated by a factor of 1000, so mixing them shifts results by decades. This tool auto-detects the unit and supports 40+ timezones. When debugging API logs, pair it with the JSON Formatter, compute date intervals with the Date Calculator, or format dates with the Date Formatter.

Per the POSIX (IEEE Std 1003.1) definition, every Unix day is exactly 86400 seconds with no leap seconds — the 27 leap seconds added since 1972 are smoothed over. Unix time is therefore not an exact representation of UTC. Most development is unaffected, but precision time works (astronomy, finance, scientific computing) must account for it.

Seconds for common time units, handy when estimating logs and cache expiry:

Time unitSecondsCommon uses
1 minute60Short-lived cache, rate-limit window
1 hour3600Token TTL, hourly stats
1 day86400Log rotation, daily jobs
1 week604800Weekly report cycle, session retention
1 year (365 days)31536000Subscription expiry, yearly archive

Timestamps in Popular Languages

JavaScript/Node.js: Date.now() returns millisecond timestamps, new Date(ts) converts to a date; Python: int(time.time()) for seconds, datetime.fromtimestamp(ts) for a date; Java: System.currentTimeMillis()/1000 for seconds, new Date(ts*1000L) for a date; PHP: time() for seconds, date('Y-m-d H:i:s', ts) for a date; Go: time.Now().Unix() for seconds, time.Unix(ts, 0) for a date. Different languages default to different precision (seconds/milliseconds) and timezone handling — use this tool to verify cross-language conversion results.

How to Use the Timestamp Converter

Timestamp → date: paste a 10- or 13-digit timestamp, choose a timezone, then click Convert to see the date, weekday, and UTC time. The top of the page shows the live current timestamp in seconds and milliseconds — tap to copy instantly. Batch conversion: switch to batch mode, one timestamp per line, and convert many log or database timestamps at once. Date → timestamp: for the reverse direction use the Date Formatter.

Timestamp Conversion FAQ

What is the difference between second-level and millisecond-level timestamps (10 vs 13 digits)?

Second-level timestamps are 10 digits — total seconds since 1970-01-01 00:00:00 UTC. Millisecond-level are 13 digits — total milliseconds. Different languages default to different precision (e.g. front-end Date.now() returns milliseconds while some back ends return seconds). This tool auto-detects whether the input is seconds or milliseconds.

How do I tell whether a timestamp is in seconds or milliseconds?

Rough rule: 10 digits = seconds (roughly covers 1970–2286), 13 digits = milliseconds, 16 digits = microseconds (used by PostgreSQL and other high-precision scenarios; 1 second = 1,000,000 microseconds). If in doubt, paste it into this tool — it auto-detects. If the converted date is decades off from now, the unit was most likely swapped.

Is a timestamp related to timezone?

A Unix timestamp itself carries no timezone — it is always the number of seconds relative to UTC. The same timestamp maps to different local times in different timezones. This tool supports 40+ timezones, so choose the one matching your data source.

What is the 2038 problem?

On 32-bit systems, a Unix timestamp can only reach 2147483647, which corresponds to 2038-01-19 03:14:07 UTC. Past that, values overflow to a negative number or to 1901. Modern 64-bit systems are unaffected, but embedded devices and old databases (MySQL 5.x INT) still matter. This tool supports 64-bit timestamps with no 2038 limit.

Is this tool safe? Will my data leak?

Safe. All conversions run in your browser using standard JavaScript APIs — your input never leaves your device. Timezone switching, batch conversion, and everything else happen purely on the front end.

How do I convert timestamps in MySQL / Java / Python?

MySQL: FROM_UNIXTIME(ts) to date, UNIX_TIMESTAMP() for the current timestamp; Java: new Date(ts*1000L) to date, System.currentTimeMillis()/1000 for seconds; Python: datetime.fromtimestamp(ts) to date, int(time.time()) for the timestamp. Default precision differs by language — validate your result here first.

The converted date looks wrong — what should I do?

Common causes: seconds/milliseconds swapped (check the digit count), wrong timezone (confirm your data source), or an invalid timestamp. Use the "current timestamp" feature here to get a known-good value to compare against, and in batch mode check each input line format.

How do I convert a timestamp to Beijing time?

This tool ships a "Beijing/Shanghai" timezone (UTC+8) — switch to it in the timestamp→date panel to display Beijing time, and the batch panel offers the same option. If the source data comes from another timezone, confirm the origin before switching to avoid an 8-hour gap.

How do I convert a timestamp to ISO 8601 or RFC 2822?

The same timestamp can be expressed in several standards: ISO 8601 like 2026-01-15T04:30:00.000Z (UTC) and RFC 2822 like Thu, 15 Jan 2026 04:30:00 UTC. Both are cross-language, cross-system date notations. This tool returns both formats together — copy them directly for logs, HTTP headers (Last-Modified/Expires), or API parameters.

Can I turn a timestamp into a "relative time" (e.g. 3 days ago)?

"Relative time" is relative to the current moment — convert the timestamp to a date first, then compare with now. This tool returns the exact date, weekday, UTC, ISO 8601, and RFC 2822, so combined with the live current timestamp on top you can estimate the difference by hand; for an "x seconds/days ago" UI, use Date.now() minus the timestamp and format it — see the code snippets section.

Date → Timestamp (inline)

Common Date ↔ Timestamp Reference

Date (Beijing time)SecondsMilliseconds
1970-01-01 00:00:00 UTC (Unix Epoch)00
2000-01-01 00:00:00 UTC (Millennium)946684800946684800000
2038-01-19 03:14:07 UTC (32-bit limit)21474836472147483647000
2026-01-01 00:00:0017671968001767196800000
2027-01-01 00:00:0017987328001798732800000
2028-01-01 00:00:0018302688001830268800000
2030-01-01 00:00:0018934272001893427200000
2035-01-01 00:00:0020511936002051193600000

Each row is the timestamp at Beijing midnight (UTC+8) for that date — handy for quick checks against logs and databases. For other timezones or arbitrary moments, use the "timestamp → date" or "date → timestamp" input above.

Timestamp Code Snippets by Language

Default precision and APIs differ by language. Below are common ways to get and convert timestamps — click "copy" to paste into your project:

JavaScript
// timestamp (ms) → date
const d = new Date(1705293000000);
console.log(d.toISOString());
// date → seconds timestamp
Math.floor(Date.now() / 1000);
Python
from datetime import datetime, timezone
# timestamp (seconds) → date
d = datetime.fromtimestamp(1705293000)
print(d.isoformat())
# date → seconds timestamp
import time
int(time.time())
Java
// timestamp (ms) → date
java.util.Date d = new java.util.Date(1705293000000L);
System.out.println(d.toInstant());
// current seconds timestamp
long ts = System.currentTimeMillis() / 1000;
Go
import "time"
// timestamp (seconds) → date
t := time.Unix(1705293000, 0)
fmt.Println(t.Format(time.RFC3339))
// current seconds timestamp
int64(time.Now().Unix())
C#
// timestamp (seconds) → date
var dt = DateTimeOffset.FromUnixTimeSeconds(1705293000);
Console.WriteLine(dt.ToString("o"));
// current seconds timestamp
DateTimeOffset.Now.ToUnixTimeSeconds();