Free browser tool · Seconds and milliseconds · No account required

Unix Timestamp Converter

Convert Unix timestamps to UTC and Beijing time, or turn a date and time into a timestamp. Choose the unit and timezone explicitly for consistent results.

🔒 100% Client-Side Offline Processing: Your conversion data never leaves your browser.

No uploads, analytics, external libraries or browser storage. The hosted page makes an initial website request. Conversion and the live clock work locally; no server scheduling is used.

Current Unix Time

UTC:
Beijing:

Live: uses your device clock.

Select seconds or milliseconds explicitly.

Beijing is fixed UTC+08:00, independent of your device timezone. Supported dates: years 0001–9999 in both displayed timezones. Maximum input length: 200 characters. The live clock is independent of the conversion input.

Enter a value, load the current time, or load the example.

How to Convert a Unix Timestamp to UTC or Beijing Time

  1. Select Timestamp → Date. Choose whether your input is seconds or milliseconds; the converter does not infer the unit from its length.
  2. Paste one timestamp. Use a number without thousands separators. Seconds can include up to three decimal places; milliseconds must be integers.
  3. Read both timezone results. Click Convert, or leave Auto-convert enabled. The result includes UTC, Beijing (UTC+08:00), Unix seconds and Unix milliseconds.
  4. Copy or clear. Copy result copies all four lines. Clear removes the conversion input and output. The separate live clock has its own Pause clock control.
Timestamp: 0 seconds
UTC: 1970-01-01 00:00:00.000
Beijing: 1970-01-01 08:00:00.000

How to Convert a Date and Time to a Unix Timestamp

  1. Select Date → Timestamp. Choose UTC or Beijing as the timezone of the date you are entering.
  2. Enter the date and time. Use YYYY-MM-DD HH:mm:ss.SSS. You may omit the fractional part or enter only YYYY-MM-DD HH:mm.
  3. Convert. Click Convert or use Auto-convert. Read the seconds and milliseconds values in the output. Fractional seconds preserve millisecond precision.
  4. Check the timezone. The UTC and Beijing lines must describe the intended instant. Use Load current time to populate the selected input format with a fresh reading from your device clock.

Troubleshooting Timestamp and Date Errors

A date appears near 1970 or far in the future

Check the selected unit. Treating milliseconds as seconds multiplies the elapsed time by 1,000; treating seconds as milliseconds divides it by 1,000. Do not rely on digit count alone.

An impossible date or timezone suffix is rejected

Dates such as 2025-02-29 and times such as 24:00 are rejected. Use a 24-hour clock, remove any Z or offset suffix, and select the intended timezone in the dropdown. Go to error selects the input position associated with the problem.

The current-time display does not match another clock

The live values use your device clock and may reflect a device time error or browser scheduling delay. Resume the clock for a fresh reading. It pauses when the tab is hidden. UTC and Beijing calendar times differ by eight hours; their Unix timestamp is the same.

This tool uses JavaScript Date for millisecond-based calculations. See the MDN Date reference for its epoch and UTC methods. Leap-second input is outside this converter's scope.

Unix Timestamp Converter FAQ

What is a Unix timestamp?

A Unix timestamp measures elapsed time from 1970-01-01 00:00:00 UTC. Unix seconds and Unix milliseconds describe the same instant at different units: 1 second equals 1,000 milliseconds.

Does the timestamp change between UTC and Beijing time?

No. The timestamp identifies one instant. UTC and Beijing are different date-time displays of that instant. This tool treats Beijing as fixed UTC+08:00; it does not model historical daylight-saving or pre-standard timezone changes.

How do I choose seconds or milliseconds?

Choose the unit explicitly in Timestamp → Date mode. Many present-day timestamps use 10 digits for seconds and 13 digits for milliseconds, but digit count is not a reliable rule for historical or distant dates. The tool does not guess the unit.

Can I convert milliseconds, fractional seconds and dates before 1970?

Yes. Milliseconds must be whole numbers; seconds may have up to three decimal places. Negative values represent instants before the Unix epoch. Both resulting UTC and Beijing dates must fall within years 0001–9999.

Why does my date show an error?

Enter YYYY-MM-DD HH:mm:ss.SSS, or YYYY-MM-DD HH:mm, and choose its timezone. Impossible dates, leap-second values, timezone suffixes and timestamps outside the supported range are rejected instead of silently corrected.

Is the live clock accurate, and does it run in the background?

The displayed time comes from your device clock, not a network time server. Refreshing is local to the open page, stops when the tab is hidden, and can be paused manually. It does not create a server task or an account automation. Browser scheduling may delay refreshes.

Is my input uploaded, and can I use this offline?

No conversion input is uploaded or saved in browser storage. All scripts and styles are inline, so a complete saved HTML page works offline with JavaScript enabled. The hosted page requires a normal initial website request. Clipboard restrictions have a manual copy fallback.

Related tools

JSON Formatter · Base64 Encoder & Decoder · All free tools