toolbench.onlineby Valkyron Labs

Converters

Unix Timestamp Converter

Turn a Unix timestamp into a date you can read, or turn a date you already have into seconds and milliseconds, with UTC and local time side by side.

Unix Timestamp Converter

Convert Unix timestamps to dates and dates back to seconds or milliseconds.

Auto-detect treats magnitudes below 100 billion as seconds. For historical millisecond values choose the unit explicitly.

Date output

—

Timestamp output

—

Ready to convert.

Output actions

Ready to copy output once your result appears.

Two directions, one instant

Unix Timestamp Converter has two fields and two Convert buttons. Unix timestamp → human-readable date prints UTC, ISO 8601, and Local from a numeric epoch. Human-readable date → Unix timestamp prints Seconds (Unix) and Milliseconds from a date string. Timestamp unit starts on Auto-detect and applies only to the numeric field. Use current time fills both fields from the browser clock and does not convert by itself. Copy output and Download output follow whichever Convert succeeded last.

How to convert a timestamp or a date

  1. 1For an epoch value, set Timestamp unit, paste into Unix timestamp → human-readable date, and press the Convert button beside that field. Auto-detect is selected on arrival. The placeholder is 1700000000.
  2. 2For the other direction, paste into Human-readable date → Unix timestamp and press the Convert button beside that field. The placeholder is 2024-01-15T12:00:00Z. An empty field says Please enter a date string.
  3. 3Press Use current time when you want the browser clock written into both boxes. Press Load sample for 1700000000000 and 2023-11-14T22:13:20Z. Neither button converts. Reset clears both inputs, both results, and the copied text.

What it is good for

  • • Reading 1700000000000 as 2023-11-14T22:13:20.000Z without guessing the unit.
  • • Turning an ISO instant that ends in Z into both seconds and milliseconds.
  • • Checking that a 10-digit value and the matching 13-digit value are the same instant.

Example

Input

2023-11-14T22:13:20Z in Human-readable date → Unix timestamp

Output

Seconds (Unix): 1700000000
Milliseconds:   1700000000000

Press the Convert button beside the date field. The three spaces after Milliseconds: line the numbers up with Seconds (Unix). Load sample puts 1700000000000 in the other field; with Auto-detect that click prints ISO 8601: 2023-11-14T22:13:20.000Z.

What each Convert button prints

The numeric Convert trims the field and accepts an optional leading minus and one decimal point. Auto-detect treats a magnitude below 100 billion as seconds and multiplies by 1,000. Anything at or above 100 billion stays milliseconds. Seconds and Milliseconds in the unit menu skip that test. The date is new Date of the resulting milliseconds. Date output is three lines: UTC from toUTCString, ISO 8601 from toISOString, and Local from toLocaleString. For 1700000000000 the UTC line is Tue, 14 Nov 2023 22:13:20 GMT and the ISO line is 2023-11-14T22:13:20.000Z. The status says Converted successfully. Interpreted as milliseconds. The same digits with the unit set to Seconds are a different century, because the page then multiplies by 1,000.

The date Convert trims the field and calls the JavaScript date parser. A failed parse says Could not parse date. Try ISO 8601 format (e.g. 2024-01-15T12:00:00Z). A success prints Seconds (Unix) as the milliseconds divided by 1,000 and rounded down, then Milliseconds as the full getTime value. 2023-11-14T22:13:20Z is 1700000000 and 1700000000000. A fractional instant such as 2023-11-14T22:13:20.500Z keeps 500 on the millisecond line and still floors the seconds line. The status on this button is Converted successfully. with no unit sentence. Local on the other result uses the browser timezone and locale, so the same UTC instant can read 10:13:20 PM in a UTC en-US browser and an hour later or earlier somewhere else. UTC and ISO do not move.

The unit menu, Use current time, and the two buttons

Timestamp unit offers Auto-detect, Seconds, and Milliseconds. The hint under the menu repeats the cutoff: magnitudes below 100 billion are seconds. The menu does not change a result already on screen. Press Convert again after you change it. Use current time writes Math.floor of Date.now divided by 1,000 into the numeric field and the current ISO string into the date field. You still choose which Convert to press. If the clock is five minutes fast, both fields are five minutes fast. Load sample writes the fixed pair and leaves the unit menu alone. Reset empties the fields and both result panes.

There are two controls named Convert. The first reads the numeric field. The second reads the date field. Copy output and Download output keep a single string, the last success. A later click replaces that string even if the other pane still shows its older lines. The download file is timestamp-converter.txt. An empty numeric field says Please enter a Unix timestamp. and does not clear a previous date result on screen, but it also does not become the copied text. A value that fails the number pattern, is not finite, or lands beyond 8.64e15 milliseconds says Invalid timestamp. Enter a Unix epoch value in seconds or milliseconds.

When an epoch value is the time you have

Use the numeric field when a log, a database column, or an API body already stores time since 1970-01-01T00:00:00Z. A 10-digit value around 1700000000 is seconds. A 13-digit value around 1700000000000 is milliseconds. Printing both forms from a date you trust is the other button, which is the check when a producer and a consumer disagree about the scale. The cron parser previews the next runs of a five-field schedule. It does not turn a single epoch number into a calendar line. This page does not evaluate a cron expression.

A UUID version 7 and a ULID also carry a millisecond time, packed into the identifier rather than printed as a decimal. The UUID v7 generator and the ULID generator decode those spellings. Pasting a ULID into this numeric field will not yield its embedded time. A longer comparison of those identifiers is in UUID v4 vs UUID v7 vs ULID. This page only converts a number and a date string.

The 100-billion cutoff and dates without a zone

100 billion milliseconds is 1973-03-03T09:46:40.000Z. Auto-detect therefore treats every smaller magnitude as seconds, including a millisecond timestamp from 1970, 1971, or 1972. 99999999999 is seconds. 100000000000 is milliseconds. A negative magnitude uses the same absolute-value test, so -1 is one second before the epoch and prints 1969-12-31T23:59:59.000Z when the unit is Auto-detect or Seconds. Historical millisecond values need the Milliseconds choice. A modern 13-digit value does not.

Prefer a date that ends in Z or an explicit offset. 2023-11-14, date only, is UTC midnight in current JavaScript, which is 1700000000 seconds only if you wanted the start of that UTC day. A string such as 14 Nov 2023 22:13:20 with no zone is interpreted in the browser's local zone, and the seconds you copy will shift if you open the page somewhere else. The page does not add leap seconds. Unix time and JavaScript Date skip them, so a leap-second instant is not a separate row. The copied text is the three lines or the two lines from the last Convert, not both directions at once.

Rules and limitations

Auto-detect: absolute value below 100,000,000,000 means seconds. Seconds always multiplies by 1,000. Milliseconds does not. The numeric result is UTC, ISO 8601, and Local. The date result is floored seconds and full milliseconds. Range stops past 8.64e15 milliseconds.

Use current time and Load sample fill fields only. Each Convert replaces the copied text. Local follows the browser zone and locale. A date with no zone can shift. Leap seconds are not distinct instants.

Common problems

If a 13-digit value landed in the year 50000s, Timestamp unit is Seconds. Switch to Milliseconds or Auto-detect and press Convert again.

If two browsers disagree on the seconds for the same pasted date, the string has no Z or offset. Add one. If Local looks an hour off, that line is the browser zone. Read ISO 8601 for the absolute instant.

Frequently asked questions

When does Auto-detect choose milliseconds?

When the absolute value is 100 billion or more. A typical 13-digit instant qualifies. A millisecond count from before 1973-03-03 does not, so choose Milliseconds for those.

What does a negative timestamp mean?

It is before 1970-01-01T00:00:00Z. With Seconds or Auto-detect, -1 prints 1969-12-31T23:59:59.000Z.

Why does Local differ from the ISO line?

ISO 8601 is always UTC. Local is toLocaleString in the browser's timezone and locale. The instant is the same.

Does Use current time also convert?

No. It writes the current seconds and the current ISO string into the fields. Press Convert on the field you want in the result.

Is my input uploaded or saved?

This tool processes input in your browser and does not save its input or output to local storage. Copy and download are user actions. The site uses analytics for page and action metadata and may use ads and production error reporting; see the Privacy Policy for those services.

About this tool

Maintained by Toolbench. For large or deeply nested files, split the input into smaller batches and verify representative results before using them in an import or application. Report reproducible problems through Contact.

Guides

Next steps

Related tools

Continue the workflow with nearby tools for formatting, publishing, debugging, or follow-up checks.

Trust

Policies, contact, and answers

Clear pages for how Toolbench works, what we collect, and how to reach us.