Shard Tools

Unix Timestamp to Date

Convert a Unix timestamp to a readable UTC date in your browser, handling seconds and milliseconds.

Maintained by Roshan.

Use Unix Timestamp to Date

Converts unix timestamp to date and time in this tab, with nothing sent anywhere.

Runs entirely on your deviceThe conversion happens in this browser tab. Nothing you type is uploaded, logged or stored, which is worth knowing for anything you would not paste into a search box.

Explore general converters

Find related browser-local tools for nearby tasks without starting another search.

Browse all general converters

About Unix Timestamp to Date

A Unix timestamp is the number of seconds since the first moment of 1970, and it is how computers store time almost everywhere - in databases, logs, APIs and file metadata - because a single number is unambiguous and easy to compare. The trouble is that a person cannot read it. Converting one to a readable date is a constant need when debugging: working out when a log entry was written, when a record was created, when a token expires. The one genuine pitfall is that timestamps come in two scales. Ten digits is seconds; thirteen is milliseconds, which many systems use for finer precision. Treating a millisecond value as seconds throws the date thousands of years into the future, so this tool tells them apart by length and interprets each correctly.

Using Unix Timestamp to Date

  1. The input is checked to be a whole number, since a timestamp is a count and any other input is a mistake.
  2. The number of digits decides the scale: a longer value is treated as milliseconds, a shorter one as seconds.
  3. The value is converted to a date and expressed in UTC, the timezone timestamps are defined against, so there is no ambiguity.
  4. The output is a readable date and time, clearly marked as UTC.
  5. An input that is not a valid timestamp is refused rather than producing a nonsensical date.

Where unix timestamp to date helps

Reading a log entry's time

A timestamp from a log line converts to the UTC moment it records, which is what you need to line events up.

Checking when a token expires

An expiry stored as a timestamp converts to a date you can actually judge against now.

Before you use the result

Questions about Unix Timestamp to Date

Why is the result in UTC?

Because timestamps are defined in UTC. Showing it in UTC avoids any timezone ambiguity; convert to local time separately if needed.

How does it know seconds from milliseconds?

By the number of digits. Ten digits is seconds, thirteen is milliseconds. Guessing wrong would throw the date off by thousands of years.

What if my timestamp has a decimal?

Remove the fraction first. This expects a whole number of seconds or milliseconds.

Can it handle dates before 1970?

Those are negative timestamps and outside the common case this targets.

Related tools

Hex to Decimal

Convert a hexadecimal number to decimal in your browser, with full precision for large values.

Decimal to Hex

Convert a decimal number to hexadecimal in your browser, with full precision for large values.