Skip to content

Convert a Unix timestamp to a date

Unix time counts from 1970-01-01T00:00:00Z, but systems disagree about the unit: databases and JWTs usually store seconds, JavaScript produces milliseconds. Auto-detect treats values of a trillion (1e12) or more as milliseconds, which is correct for any realistic date; the Unit option forces either interpretation when you know better.

Example

Input
1700000000
Output
{
  "iso": "2023-11-14T22:13:20.000Z",
  "utc": "Tue, 14 Nov 2023 22:13:20 GMT",
  "unix_seconds": 1700000000
}

Ten digits reads as seconds. The same number with three more zeros would be read as milliseconds and produce the same date.

Input and output

Input is a single number, seconds or milliseconds since the epoch, negative values allowed for pre-1970 dates. Output is JSON with the ISO 8601 form, the UTC string, and the timestamp normalized to seconds.

Non-numeric input and out-of-range values produce errors instead of a wrong date. The companion tools convert the other direction (date to Unix) and print the current timestamp.

Privacy

This tool runs entirely in your browser. The input is never uploaded, logged, or stored; close the tab and it is gone. The one deliberate exception in the whole Toolbox is the explicit Save as new paste button on the output, which does exactly what it says and nothing before you press it.

Conversion is arithmetic on your device; the value is never sent anywhere.

Common uses

  • Reading created_at epoch fields while spelunking a database or API response
  • Turning a JWT exp claim into a date to see when a token dies
  • Interpreting timestamps in server logs during an incident
  • Checking whether a cache TTL or expiry field says what you think it says

Need to share the result?

Run the tool, then use Save as new paste on the output to get a link you can send. The paste is unlisted, expires in a week, and the recipient needs no account. Or start from a blank paste if you already have the text.

Related tools

More tool pages: Format and validate JSON, Decode Base64 to text, Decode a JWT, Generate UUIDs, Convert CSV to JSON. Everything else lives in the full Toolbox, which also chains tools into workflows.