Unix Time Converter

Generate and inspect ID/random/timestamp values in your browser. No input is sent to a server. Use it for first-pass spec compliance checks.

Status

Runs in your browser. No input is sent to a server. Use this as a first-pass diagnostic step.

How to use

Enter seconds, milliseconds, or ISO to auto-convert. Confirm in UTC first, then switch display TZ if needed.

Notes (this tool)

  • Unix time is UTC-based; changing time zone affects display only.
  • JWT exp/iat/nbf are typically in seconds. If you see 13 digits, suspect milliseconds.

About this page

What does this tool do?

Convert Unix time (seconds/milliseconds) to UTC or a chosen time zone, and convert dates back to Unix time.

Useful for JWT exp/iat/nbf checks and log time comparisons.

Seconds vs milliseconds

In practice you will encounter both Unix seconds (~10 digits) and milliseconds (~13 digits). Mixing them up produces wildly incorrect dates.

  • Example: 1700000000 (sec) ↔ 1700000000000 (ms)
  • JWT exp/iat/nbf are typically in seconds

Time zones and DST

Unix time is a continuous UTC-based timestamp. Changing the time zone changes display. Be aware that DST can affect local-time representation.

Debugging workflow (recommended)

  • Determine sec/ms first by digit length
  • Confirm the baseline in UTC first
  • Then map to local/custom TZ for business context
  • For JWT times, compare exp/nbf/iat together to verify ordering

Recommendations (practical)

  • Explicitly document seconds vs milliseconds in API specs
  • Store logs in UTC and convert in presentation layers
  • Apply small clock-skew allowance for expiry checks

What this tool does

  • Unix time (sec/ms) → ISO 8601
  • ISO 8601 → Unix time (sec/ms)
  • Time zone display (UTC/local/custom)

Common pitfalls

  • Treating seconds as milliseconds and getting 1970/future dates
  • Relying on local time only and missing the UTC baseline
  • Using fixed offsets on DST transition dates

Operational notes

  • Format validity does not guarantee security or uniqueness. Confirm requirements by use case.
  • Align randomness, timestamp, and formatting handling with your operational policy.

Referenced specs

  • Unix time (since 1970-01-01T00:00:00Z)
  • ISO 8601 / RFC 3339 (date/time format)
  • IANA Time Zone Database (TZ names)

FAQ

Is it seconds or milliseconds?

There are separate inputs for seconds and milliseconds. Large values are usually milliseconds.

Does the time zone affect conversion?

Unix time is UTC-based. Changing the time zone only affects the displayed time.

Does it handle negative Unix time (pre-1970)?

Supported ranges depend on browser Date implementations. Out-of-range values may fail.

References

  1. RFC 3339 (Date and Time on the Internet)
  2. IANA Time Zone Database
  3. POSIX: time()

Example

1700000000 → 2023-11-14T22:13:20Z
1700000000000 → 2023-11-14T22:13:20.000Z