Time
Unix Timestamp Converter
Convert Unix timestamps to UTC and local time, detect seconds versus milliseconds, and create Unix values from a date input.
Loading...
Loading...
Runs locally in your browser. Your input is not uploaded.
How this tool works
Unix timestamps count time since 1970-01-01T00:00:00Z.
Many APIs use seconds, while JavaScript dates commonly use milliseconds, so the page labels both clearly.
Examples
- Convert a JWT exp timestamp into local time.
- Create a Unix millisecond value from a scheduled date.
- Convert -1 seconds to verify the pre-epoch boundary and compare UTC with local display.
Common use cases
Seconds, milliseconds, UTC, and local time
Unix timestamps represent an instant since the UTC epoch. The most common bug is mixing seconds and milliseconds: many APIs use seconds, while JavaScript Date uses milliseconds.
DevPouch shows UTC and local output because UTC is better for system-to-system debugging, while local time helps compare a value with what someone saw on their screen.
Common timestamp mistakes
- Passing Date.now() where an API expects Unix seconds.
- Assuming the timestamp itself stores a timezone.
- Reading JWT exp or iat claims as milliseconds.
- Comparing formatted local strings instead of numeric instants.
Invalid or unsafe assumption
Invalid/failure example
Passing milliseconds as seconds can produce a date tens of thousands of years away.
Mistakes to avoid
- Mixing seconds and milliseconds.
- Dropping timezone context from a displayed date.
- Using local wall-clock text as a unique instant.
Limits of this workflow
Browser Date supports a finite timestamp range.
Locale formatting depends on the browser and operating system timezone data.
Local-processing and privacy boundary
Timestamp values are converted entirely with browser date APIs and are not transmitted.
Practical workflow
- Identify or override the unit.
- Convert to an ISO UTC instant.
- Compare local display only for presentation.
- Test epoch, negative, and range boundaries in the target runtime.
Related guides
Official references
FAQ
How does seconds versus milliseconds detection work?
Shorter values are treated as seconds, while larger epoch values are treated as milliseconds.
Why show UTC and local time?
UTC is consistent across systems, while local time helps compare values to your current timezone.
Why do seconds and milliseconds show different dates?
Milliseconds contain three additional decimal digits; using the wrong unit scales the instant by 1,000.